mirror of
https://github.com/miaowware/qrm2.git
synced 2025-02-03 09:44:07 -05:00
commit
118e3f5d90
@ -10,6 +10,7 @@ General Public License, version 2.
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import re
|
import re
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
import random
|
||||||
|
|
||||||
import discord
|
import discord
|
||||||
import discord.ext.commands as commands
|
import discord.ext.commands as commands
|
||||||
@ -38,13 +39,16 @@ class BaseCog(commands.Cog):
|
|||||||
@commands.command(name="ping")
|
@commands.command(name="ping")
|
||||||
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 = ''
|
||||||
|
if random.random() < 0.05:
|
||||||
|
content = f'<@{ctx.message.author.id}>'
|
||||||
embed = discord.Embed(title="**Pong!**",
|
embed = discord.Embed(title="**Pong!**",
|
||||||
description=f'Current ping is {self.bot.latency*1000:.1f} ms',
|
description=f'Current ping is {self.bot.latency*1000:.1f} ms',
|
||||||
colour=self.gs.colours.neutral,
|
colour=self.gs.colours.neutral,
|
||||||
timestamp=datetime.utcnow())
|
timestamp=datetime.utcnow())
|
||||||
embed.set_footer(text=ctx.author.name,
|
embed.set_footer(text=ctx.author.name,
|
||||||
icon_url=str(ctx.author.avatar_url))
|
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"])
|
@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