Merge pull request #4 from iakrules/ping

added ping
This commit is contained in:
ishaan 2021-05-18 18:36:27 -04:00 committed by GitHub
commit 1b9c935b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,9 +12,9 @@ class ExampleCog(commands.Cog):
print('Bot is online.') print('Bot is online.')
# Commands # Commands
@commands.command() @commands.command(aliases=['latency'])
async def ping(self, ctx): async def ping(self, ctx):
await ctx.send('Pong!') await ctx.send(f'Pong! `{round(client.latency * 1000)}ms`')
def setup(client): def setup(client):
client.add_cog(ExampleCog(client)) client.add_cog(ExampleCog(client))