Updated bot.py and pingCog.py
This commit is contained in:
parent
98de50e555
commit
b6ef2a7567
2 changed files with 10 additions and 7 deletions
|
|
@ -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))
|
||||
Loading…
Add table
Add a link
Reference in a new issue