LogoRobo.js
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

ParameterType
devboolean
forceboolean
newCommandsRecord<string, CommandEntry>
newMessageContextCommandsRecord<string, ContextConfig>
newUserContextCommandsRecord<string, ContextConfig>
changedCommandsstring[]
addedCommandsstring[]
removedCommandsstring[]
changedContextCommandsstring[]
addedContextCommandsstring[]
removedContextCommandsstring[]
config?DiscordConfig

Returns

Promise<void>

On this page