Skip to content

Issue 2: Migrate to Slash Commands (/ping, /help) #2

@parshvi1508

Description

@parshvi1508

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions