ia_bot/commands/ping.py
Benjamyn 43ca943cb8 feat: A.B.I.N.A.S.H Discord bot with GIF emotes, slash commands, and music
- Core bot with slash command tree (discord.py 2.7.x compatible)
- Commands: /ping, /info, /hello, /emoji, /app-emoji
- Admin: /upload-emoji, /list-emojis, /delete-emoji
- GIF emote detection and reaction handling
- Message reactions with percentage-based triggers and cooldowns
- Voice/music cog with YTDLSource, skip, volume, pause, resume, stop
- Global error handler and voice state change logging
- Environment config via .env (DISCORD_TOKEN, COMMAND_PREFIX, etc.)
2026-08-27 16:05:27 +10:00

31 lines
799 B
Python

"""Ping slash command."""
import discord
from discord.app_commands import Command
from discord.ext import commands
async def ping(interaction: discord.Interaction) -> None:
"""Check the bot's latency."""
latency = round(interaction.client.latency * 1000)
await interaction.response.send_message(
f"Pong! Latency: {latency}ms",
ephemeral=True,
)
ping.__signature__ = None # type: ignore
async def info(interaction: discord.Interaction) -> None:
"""Show bot information."""
await interaction.response.send_message(
f"**{interaction.client.user.name}**\n"
f"ID: {interaction.client.user.id}\n"
f"Bot! (ping: {round(interaction.client.latency * 1000)}ms)",
ephemeral=True,
)
info.__signature__ = None # type: ignore