From 367816995d77c82ffe87638f5ae9eb527a3ae7ce Mon Sep 17 00:00:00 2001 From: ishaan Date: Tue, 18 May 2021 18:32:08 -0400 Subject: [PATCH 1/3] added ping --- cogs/{exampleCog.py => pingCog.py} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename cogs/{exampleCog.py => pingCog.py} (76%) diff --git a/cogs/exampleCog.py b/cogs/pingCog.py similarity index 76% rename from cogs/exampleCog.py rename to cogs/pingCog.py index 19b2af8..c17b826 100644 --- a/cogs/exampleCog.py +++ b/cogs/pingCog.py @@ -12,9 +12,9 @@ class ExampleCog(commands.Cog): print('Bot is online.') # Commands - @commands.command() + @commands.command(aliases=['latency']) async def ping(self, ctx): - await ctx.send('Pong!') + await ctx.send(f'Pong! `{round(client.latency * 1000)}ms`') def setup(client): client.add_cog(ExampleCog(client)) \ No newline at end of file From 2ad396dbc54e5fd9b907930e3ba38626c163d373 Mon Sep 17 00:00:00 2001 From: ishaan Date: Tue, 18 May 2021 18:45:44 -0400 Subject: [PATCH 2/3] Update pingCog.py --- cogs/pingCog.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/pingCog.py b/cogs/pingCog.py index c17b826..6c51f8d 100644 --- a/cogs/pingCog.py +++ b/cogs/pingCog.py @@ -1,7 +1,7 @@ import discord from discord.ext import commands -class ExampleCog(commands.Cog): +class PingCog(commands.Cog): def __init__(self, client): self.client = client @@ -17,4 +17,4 @@ class ExampleCog(commands.Cog): await ctx.send(f'Pong! `{round(client.latency * 1000)}ms`') def setup(client): - client.add_cog(ExampleCog(client)) \ No newline at end of file + client.add_cog(PingCog(client)) \ No newline at end of file From 587c378be89da70e395ab4efe9e444ba7fc8a74b Mon Sep 17 00:00:00 2001 From: ishaan Date: Tue, 18 May 2021 18:47:54 -0400 Subject: [PATCH 3/3] Update pingCog.py --- cogs/pingCog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cogs/pingCog.py b/cogs/pingCog.py index 6c51f8d..d3aa6e5 100644 --- a/cogs/pingCog.py +++ b/cogs/pingCog.py @@ -14,7 +14,7 @@ class PingCog(commands.Cog): # Commands @commands.command(aliases=['latency']) async def ping(self, ctx): - await ctx.send(f'Pong! `{round(client.latency * 1000)}ms`') + await ctx.send(f'Pong! {round(client.latency * 1000)}ms') def setup(client): client.add_cog(PingCog(client)) \ No newline at end of file