Merge pull request #73 from classabbyamp/ping-surprise

ternary statements, ofc
This commit is contained in:
Abigail Gold 2019-11-09 23:02:59 -05:00 committed by GitHub
commit a02e68b91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -39,9 +39,7 @@ class BaseCog(commands.Cog):
@commands.command(name="ping")
async def _ping(self, ctx: commands.Context):
"""Show the current latency to the discord endpoint."""
content = ''
if random.random() < 0.05:
content = f'<@{ctx.message.author.id}>'
content = ctx.message.author.mention if random.random() < 0.05 else ''
embed = discord.Embed(title="**Pong!**",
description=f'Current ping is {self.bot.latency*1000:.1f} ms',
colour=self.gs.colours.neutral,