feat(commands/bot): add ping

This commit is contained in:
Ryan 2025-01-08 16:03:24 -05:00
parent 79fd40a8e3
commit aa4632b4dd
Signed by: ErrorNoInternet
GPG Key ID: 2486BFB7B1E6A4A3
3 changed files with 14 additions and 0 deletions

View File

@ -84,6 +84,17 @@ async def uptime(message):
) )
async def ping(message):
await utils.reply(
message,
embed=disnake.Embed(
title="Pong :ping_pong:",
description=f"Latency: **{round(client.latency * 1000, 1)} ms**",
color=EMBED_COLOR,
),
)
async def help(message): async def help(message):
await utils.reply( await utils.reply(
message, message,

View File

@ -13,6 +13,7 @@ class Command(Enum):
JOIN = "join" JOIN = "join"
LEAVE = "leave" LEAVE = "leave"
PAUSE = "pause" PAUSE = "pause"
PING = "ping"
PLAY = "play" PLAY = "play"
PLAYING = "playing" PLAYING = "playing"
PURGE = "purge" PURGE = "purge"

View File

@ -145,6 +145,8 @@ async def on_message(message, edited=False):
await commands.voice.fast_forward(message) await commands.voice.fast_forward(message)
case C.STATUS: case C.STATUS:
await commands.bot.status(message) await commands.bot.status(message)
case C.PING:
await commands.bot.ping(message)
except Exception as e: except Exception as e:
await utils.reply( await utils.reply(
message, message,