This commit is contained in:
Abigail Gold 2020-01-04 01:40:17 -05:00
parent 0615df0829
commit f974bf1223
No known key found for this signature in database
GPG Key ID: CF88335E873C3FB4

View File

@ -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):