Interactions

Interactions

Learn how to create and manage Discord interactions with djs-core.

Interactions in djs-core refer to Application Commands - the primary way users invoke your bot's functionality directly from Discord's interface.

What are Interactions?

Interactions are commands that users can trigger through Discord's command interface. In djs-core, there are two types of interactions:

  • Slash Commands: Typed commands that appear in Discord's command menu
  • Context Menus: Right-click commands that appear when clicking on users or messages

Types of Interactions

Commands (Slash Commands)

Slash commands are typed commands that users can invoke using Discord's command palette. They can accept various types of options (text, users, channels, etc.) and support autocomplete.

Learn more in the Commands guide.

Context Menus

Context menus are commands that appear when users right-click on Discord elements (users or messages). They provide quick access to bot functionality directly from the context menu.

Learn more in the Context Menus guide.

Note on Components

Buttons, select menus, and modals are not interactions - they are components that can be used within command or context menu responses to create interactive experiences.

Frequently Asked Questions