Interactions in djs-core refer to Application Commands - the primary way users invoke your bot's functionality directly from Discord's interface.
Interactions are commands that users can trigger through Discord's command interface. In djs-core, there are two types of interactions:
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 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.
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.
Commands (slash commands) are typed by users in Discord's command palette (type / to see them). They appear as suggestions as you type and can accept various options like text, users, channels, etc.
Context menus appear when you right-click on Discord elements (users or messages). They provide quick actions without typing, perfect for moderation, user info, or message-specific actions.
Commands are organized using the file structure. For example:
src/interactions/commands/ping.ts → /pingsrc/interactions/commands/admin/kick.ts → /admin kicksrc/interactions/commands/shop/buy.ts → /shop buySubdirectories automatically create command groups in Discord.