EmperorFred/discord_bot/cogs/ping.py

19 lines
556 B
Python
Raw Normal View History

2025-12-06 02:21:47 +00:00
from discord.ext import commands as discord_commands
from libs.Cog import Cog
class PingCog(Cog):
"""Basic health check command(s)."""
def __init__(self, bot: discord_commands.Bot) -> None:
super().__init__(bot)
self.messages_deletable = True
@discord_commands.command(name="ping")
async def ping(self, ctx: discord_commands.Context) -> None:
"""Responds to !ping in Discord"""
await ctx.send("Pong from Discord!")
async def setup(bot: discord_commands.Bot) -> None:
await bot.add_cog(PingCog(bot))