Updated bot.py and pingCog.py

This commit is contained in:
ishaan 2021-05-18 19:49:39 -04:00
parent 98de50e555
commit b6ef2a7567
2 changed files with 10 additions and 7 deletions

View file

@ -6,15 +6,11 @@ class PingCog(commands.Cog):
def __init__(self, client):
self.client = client
# Events
@commands.Cog.listener()
async def on_ready(self):
print('Bot is online.')
# Commands
@commands.command(aliases=['latency'])
async def ping(self, ctx):
await ctx.send(f'Pong! {client.latency}ms')
# await ctx.send(f'Pong! {client.latency}ms')
await ctx.send('Pong!')
def setup(client):
client.add_cog(PingCog(client))