Packages@robojs/discordjs
registerCommands()
Function: registerCommands()
function registerCommands(
dev,
force,
newCommands,
newMessageContextCommands,
newUserContextCommands,
changedCommands,
addedCommands,
removedCommands,
changedContextCommands,
addedContextCommands,
removedContextCommands,
config?): Promise<void>High-level command registration function.
Handles the full registration workflow including:
- Loading environment variables
- Building command structures
- Logging changes with colors
- Handling command deletions for removed commands
- Error handling and user feedback
Parameters
| Parameter | Type |
|---|---|
dev | boolean |
force | boolean |
newCommands | Record<string, CommandEntry> |
newMessageContextCommands | Record<string, ContextConfig> |
newUserContextCommands | Record<string, ContextConfig> |
changedCommands | string[] |
addedCommands | string[] |
removedCommands | string[] |
changedContextCommands | string[] |
addedContextCommands | string[] |
removedContextCommands | string[] |
config? | DiscordConfig |
Returns
Promise<void>
