mirror of
https://github.com/miaowware/qrm2.git
synced 2024-11-15 12:42:02 -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))
|
embed.set_thumbnail(url=str(self.bot.user.avatar_url))
|
||||||
await ctx.send(embed=embed)
|
await ctx.send(embed=embed)
|
||||||
|
|
||||||
@commands.command(name="ping")
|
@commands.command(name="ping", aliases=['beep'])
|
||||||
async def _ping(self, ctx: commands.Context):
|
async def _ping(self, ctx: commands.Context):
|
||||||
"""Show the current latency to the discord endpoint."""
|
"""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 = 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'
|
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"])
|
@commands.command(name="changelog", aliases=["clog"])
|
||||||
async def _changelog(self, ctx: commands.Context):
|
async def _changelog(self, ctx: commands.Context):
|
||||||
|
Loading…
Reference in New Issue
Block a user