cogs, shardable, setup, update, say_ralf commands

Signed-off-by: Marc Ahlgrim <marc@onemarcfifty.com>
This commit is contained in:
Marc Ahlgrim
2022-07-26 11:43:33 +02:00
parent 2e25186e96
commit 455da6a9f3
17 changed files with 503 additions and 363 deletions
+19
View File
@@ -0,0 +1,19 @@
import time
import os
from discord.ext import commands
class Information(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.command()
async def ping(self, ctx):
before = time.monotonic()
before_ws = int(round(self.bot.latency * 1000, 1))
message = await ctx.send("🏓 Pong")
ping = (time.monotonic() - before) * 1000
await message.edit(content=f"🏓 Pong: {before_ws}ms | REST: {int(ping)}ms")
async def setup(bot):
await bot.add_cog(Information(bot))