implemented general help command and command specific help

This commit is contained in:
2023-05-24 01:19:40 +01:00
parent 9569ad7ace
commit 2cd080bf02
6 changed files with 126 additions and 29 deletions

23
cogs/music/main.py Normal file
View File

@@ -0,0 +1,23 @@
import discord
from discord.ext import commands
from discord.ext.commands.context import Context
import datetime
import pytz
class music(commands.Cog):
def __init__(self, client):
self.name = "🎶 Music"
self.emoji = "🎶"
self.client = client
@commands.command(
help="Displays latency from the bot",
aliases=['delay'])
async def ping(self, e: Context):
start_time = datetime.datetime.now(pytz.utc)
end_time = e.message.created_at
delay = int((end_time - start_time).total_seconds() * 1000)
await e.send(f"Pong! `{delay}MS`")