ping.py
unknown
python
a year ago
533 B
11
Indexable
import discord
from discord.ext import commands
class Ping(commands.Cog):
def __init__(self, bot):
self.bot = bot
@discord.app_commands.command(name='ping', description="Check bot latency")
async def ping(self, interaction: discord.Interaction):
await interaction.response.send_message("Pong!")
async def cog_load(self):
print(f"Slash command '/ping' is being registered.")
async def setup(bot):
await bot.add_cog(Ping(bot))
print("Ping Cog loaded successfully.")
Editor is loading...
Leave a Comment