dc_create_application_command

dc_create_application_command(type, parsable, server?)#

Creates a slash command or a context menu command for the bot.

Blocking function

Invoking this function can freeze the game. Use it in a task to avoid freezing your game.

Input parameters#

Parameter Type Description
type String The type of command to create.
parsable (See command types) The parsable to be used.
server Server The server to create the command in.
If left empty, the command will be available in all servers the bot is in.

Command types#

Depending on the type, this function expects different parsables for parsable:

String Parsable
SLASH_COMMAND Slash command builder
USER_CONTEXT_MENU User context menu builder
MESSAGE_CONTEXT_MENU Message context menu builder

Output values#

Return values#

  • The created application command value.

Uncaught exceptions #

  • Throws an exception on failure.