mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-26 09:48:41 -05:00
beep
This commit is contained in:
parent
0615df0829
commit
f974bf1223
12
exts/base.py
12
exts/base.py
@ -106,14 +106,18 @@ class BaseCog(commands.Cog):
|
||||
embed.set_thumbnail(url=str(self.bot.user.avatar_url))
|
||||
await ctx.send(embed=embed)
|
||||
|
||||
@commands.command(name="ping")
|
||||
@commands.command(name="ping", aliases=['beep'])
|
||||
async def _ping(self, ctx: commands.Context):
|
||||
"""Show the current latency to the discord endpoint."""
|
||||
content = ctx.message.author.mention if random.random() < 0.05 else ''
|
||||
embed = cmn.embed_factory(ctx)
|
||||
embed.title = "**Pong!**"
|
||||
content = ''
|
||||
if ctx.invoked_with == "beep":
|
||||
embed.title = "**Boop!**"
|
||||
else:
|
||||
content = ctx.message.author.mention if random.random() < 0.05 else ''
|
||||
embed.title = "🏓 **Pong!**"
|
||||
embed.description = f'Current ping is {self.bot.latency*1000:.1f} ms'
|
||||
await ctx.send(content=content, embed=embed)
|
||||
await ctx.send(content, embed=embed)
|
||||
|
||||
@commands.command(name="changelog", aliases=["clog"])
|
||||
async def _changelog(self, ctx: commands.Context):
|
||||
|
Loading…
Reference in New Issue
Block a user