This commit is contained in:
Abigail Gold 2019-11-09 02:17:48 -05:00
parent d66cc63b5f
commit 4b6e8db257
No known key found for this signature in database
GPG Key ID: 80A676456AB6B045

View File

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