basic setup

This commit is contained in:
Soenke committed 2026-05-22 22:50:58 +02:00
commit b3508664d3
9 files changed
+186

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
import discord
from discord.ext import commands
from discord import app_commands
class Ping(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@app_commands.command(name="ping", description='Responds with "pong!"')
async def ping(self, interaction: discord.Interaction):
latency = round(self.bot.latency * 1000)
await interaction.response.send_message(f"Pong! ({latency}ms)")
async def setup(bot: commands.Bot):
await bot.add_cog(Ping(bot))