Discord API interactions, message components, slash commands, modals, webhooks, and embeds. Use when building Discord bots, creating slash commands (application commands), adding interactive components (buttons, select menus, text inputs), implementing modal forms, sending webhook messages, constructing rich embeds, handling interaction responses (defer, reply, followup, edit), registering global/guild commands, configuring command permissions, or working with discord.py (Python) and discord.js (TypeScript/JavaScript) libraries.
Build Discord bots with interactive components, slash commands, modals, and webhooks.
Activate when working with:
Core API concepts and object structures from the official Discord developer docs.
| Reference | Content |
|---|---|
| Components | All component types (buttons, selects, text inputs, V2 layout), fields, constraints |
| Interactions | Interaction object, types, callback types, response endpoints, security |
| Slash Commands | Command types, option types, registration, permissions, subcommands, autocomplete |
| Modals | Modal structure, text inputs, selects, file uploads, submission handling |
| Webhooks | Webhook types, execution, message CRUD, Slack/GitHub compatibility |
| Embeds | Embed structure, field limits, allowed mentions, message flags |
Library-specific patterns for the two most popular Discord bot frameworks.
| Reference | Content |
|---|---|
| Components | Views, Buttons, Selects, Modals, TextInput, interaction callbacks |
| Commands | app_commands, hybrid commands, tree.sync, groups, error handling |
| Webhooks | Webhook class, sending embeds/files, editing/deleting messages |
| Reference | Content |
|---|---|
| Components | ButtonBuilder, SelectMenuBuilders, ModalBuilder, TextInputBuilder, LabelBuilder |
| Commands | SlashCommandBuilder, response methods, options, subcommands, registering |
| Webhooks & Embeds | WebhookClient, EmbedBuilder, sending/editing/deleting webhook messages |
User action → Interaction received → Must respond within 3s
├── reply() → Immediate message
├── deferReply() → "Thinking..." then editReply() within 15m
├── showModal() → Open modal form (must be first response)
├── update() → Edit originating message (components only)
└── deferUpdate() → Ack without visible change (components only)