Skip to content

Interactions & commands overview

Status Stable · Last verified 2026-07-11 · API v10 · Sources Interactions overview, Receiving & responding, Application commands

An interaction is any moment a user invokes your app: running a command, clicking a button, choosing from a select menu, or submitting a modal. Interactions are the modern, first-class way to build app UX — they replaced ad-hoc “prefix commands” that scraped message text (which now also require the privileged MESSAGE_CONTENT intent — see Intents).

Page What it covers
Interaction lifecycle The 5 interaction types, the 3-second ACK, deferral, the 15-minute token
Signature verification The Ed25519 flow for HTTP endpoints, step by step, with pitfalls
Slash commands Command types, options, autocomplete, localization, registration
Components: buttons, selects, modals Interactive components and Components V2
Responses & follow-ups Response types, ephemeral, editing, follow-up messages
Security pitfalls The mistakes that break or expose interaction apps
Type Value How the user triggers it Example
Slash command (CHAT_INPUT) 1 Types /name with typed options/autocomplete /ban user:@x reason:"spam"
User command (USER) 2 Right-clicks a userApps “Show avatar”
Message command (MESSAGE) 3 Right-clicks a messageApps “Report”, “Translate”

Commands can be global (all installs) or guild-scoped (one server, updates instantly — ideal for development). Full detail: Slash commands.

Beyond commands, messages carry interactive components — buttons, select menus (string/user/role/mentionable/channel), and pop-up modals. Discord’s Components V2 system (opt-in per message via the IS_COMPONENTS_V2 flag, 1 << 15) additionally lets you compose the whole message from components instead of content + embeds. See Components.

HTTP Interactions Endpoint Gateway
Transport Discord POSTs to your URL Delivered as gateway events
Hosting Serverless-friendly, stateless Needs a persistent socket
Must verify Ed25519 signature Yes (mandatory) No (already authenticated)
Good when You don’t want an always-on process You already run a bot for events

The endpoint path runs on Workers/Lambda/Vercel with no socket — but you must verify every request’s signature (details). Runnable: interaction-endpoint (HTTP) and bot-gateway-minimal (gateway).

Commands are created via REST, not the portal — usually once at deploy time. Guild-scoped updates are instant; global ones take time to propagate:

Terminal window
# Bulk-overwrite this app's guild commands (instant during development):
curl -X PUT \
"https://discord.com/api/v10/applications/$DISCORD_APPLICATION_ID/guilds/$DISCORD_TEST_GUILD_ID/commands" \
-H "Authorization: Bot $DISCORD_BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '[{ "name": "ping", "description": "Replies with pong", "type": 1 }]'

Swap /guilds/{id}/commands for /commands to register globally. More: Slash commands → registration.

Start with the interaction lifecycle — the timing rules underpin everything else.