dc_create_application_command
dc_create_application_command(type, commandBuilder, server?)
#
Blocking function
This function is blocking, meaning it can freeze the game. Use it in a task to avoid freezing your game.
Depending on the type
, this function expects different parsables:
slash_command
-> Slash command builder parsableuser_context_menu
-> User context menu builder parsablemessage_context_menu
-> Message context menu builder parsable
Function for creating slash commands for the bot.
When specifying a server
, the slash command will only be created for that particular server.
If server
is not provided, the slash command will be global, meaning they work in all servers the bot is in.
Returns an application command value.
Throws an exception on failure
For a full examples of commands, see the slash command example