-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Replace legacy !commands with modern slash commands using discord.app_commands. This sets the base structure for all future commands like /ticket create.
Everything under discord.app_commands and discord.ext.commands.Bot must be fully async, because:
Slash commands run on event loop
Discord expects async responses
Blocking calls (like time.sleep() or requests without aiohttp) can crash or freeze the bot.
Use commands.Bot (async)
Attach app_commands.CommandTree
Await everything (e.g., on_ready(), tree.sync())
Add async /ping command
Add async /help command
use await tree.sync(guild=discord.Object(id=YOUR_GUILD_ID))
Test in your server:
- Slash commands should auto-suggest
- Reply must be instant (async)
Typing /ping → Bot replies 🏓 Pong!
Typing /help → Bot lists available commands
Metadata
Metadata
Assignees
Labels
No labels