diff --git a/cogs/basecog.py b/cogs/basecog.py index a133348..f112612 100644 --- a/cogs/basecog.py +++ b/cogs/basecog.py @@ -10,6 +10,7 @@ General Public License, version 2. from datetime import datetime import re from collections import OrderedDict +import random import discord import discord.ext.commands as commands @@ -38,13 +39,16 @@ 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}>' embed = discord.Embed(title="**Pong!**", description=f'Current ping is {self.bot.latency*1000:.1f} ms', colour=self.gs.colours.neutral, timestamp=datetime.utcnow()) embed.set_footer(text=ctx.author.name, icon_url=str(ctx.author.avatar_url)) - await ctx.send(embed=embed) + await ctx.send(content=content, embed=embed) @commands.command(name="changelog", aliases=["clog"]) async def _changelog(self, ctx: commands.Context):