ping with times
This commit is contained in:
parent
582beb2a42
commit
30e9fc328f
@ -14,7 +14,11 @@ class CogName:
|
|||||||
@commands.command()
|
@commands.command()
|
||||||
async def ping(self, ctx):
|
async def ping(self, ctx):
|
||||||
"""Say pong"""
|
"""Say pong"""
|
||||||
await ctx.send('Pong')
|
now = ctx.message.created_at
|
||||||
|
msg = await ctx.send('Pong')
|
||||||
|
sub = msg.created_at - now
|
||||||
|
await ctx.edit(content=f'Pong, {sub.total_seconds() * 1000})
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(CogName(bot))
|
bot.add_cog(CogName(bot))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user