Are you always fed up with creating interactions by hand or developing your own tools to deploy, update, or delete a slash command or a context menu ? Same thing when listing interactions — because it’s a mess with specific guild interactions and global interaction ? You never know which one is where or which permission it have ? This tool is made for you ! Discord Interaction Manager is a lightweight CLI tool to manage Discord bot interactions (slash commands, context menus) in under 10 seconds. Generate, deploy, list, update, delete, your interactions with an interactive terminal interface.
✨ Features
📡 Interaction Management: List, deploy, update, delete global/guild commands & context menus
⚙️ File Generation: Interactive JSON generators for slash commands & context menus
🔍 Guild Discovery: Auto-detect all guilds + interaction counts per guild
🎛️ Interactive CLI: Rich menus, input validation, interaction selection
📦 Only one runtime deps: Only discord.js is required in production
🛡️ Never deprecated: Uses discord.js for all Discord requests and enum, always up-to-date with Discord API
This documentation assume that you know how interactions are built on Discord, if not, please see :
- Discord Component are not supported, because it's not a static thing register on Discord.
- Discord "Activities" are not supported, because it's a complete game feature.
npm install @spatulox/discord-interaction-managerYou can use dotenv or set them by hand
DISCORD_BOT_TOKEN="" // Discord Bot Token
DISCORD_BOT_CLIENTID="" // The clientID of your bot
DISCORD_INTERACTION_FOLDER="" // Optionnal, redirect where the generated interactions files are stored
Simply type "dim" in your console (which stands for DiscordInteractionManager)
dimYou will be greet by a CLI :
💠 SimpleDiscordBot CLI
════════════════════════════════════════
1. Manage Interactions
2. Generate Files
3. Help
4. Exit
════════════════════════════════════════
Choose an option:
- You can generate slash commands and context menu with the cli
- When generating files with the cli, you should be able to see generated files in the "./handlers"*
- Once you have deployed an interaction, you can update/delete it using the cli
- The scope** of the interaction is determined while generating the file
- List global interaction
- List interaction locked to a specific guild
- Count the number of interaction by scope**
- You can update any interaction, by updating the generated file inside the "./handlers" folder*
- Once you updated the generated file, you can use the cli to update the interaction on Discord
- If you want to change the scope** of an interaction you can delete/add the "guild_ids" field in the generated interaction files, just don't forget to delete the old one and deploy the new one. Normal update will not work
- If you want to update the permission of the interaction, you need to update the "default_member_permissions_string" field with the keyof PermissionBitFields of discordjs (or let it empty for everyone), it will automatically update the "default_member_permissions" field required by Discord
- If the "default_member_permissions_string" field doesn't exist for some reason, you can create it or go to the Discord Dev potal, in any of your app, go to the "Bot" tab and then check any of the "BotPermission" you want for the interaction and then copy the "Permission Integer" to paste it inside the "default_member_permissions" field inside the json of the interaction
- You can delete any interaction, in any scope**
Key:
- *Folder at the root of your project, if not, make sure you didn't overwrite the path with the DISCORD_INTERACTION_FOLDER variable
- **Scope refer to "global" or "guild specific"