Learn how to register your application commands properly
First, we need to take a look at different types of application commands:
Global: can be used globally, on every guilds
Guild: can only be used in a specific guild
User: can only be used by a specific user
These are specific scopes that an application command can be applied to.
Global commands
To register a global command you'll need to use the following Client method: registerGlobalApplicationCommand and pass your Application Command inside it.
to register more than one guild command, you can use the alternative method: bulkRegisterGlobalApplicationCommand, though you will have to specify the guild ID inside each object instead:
There are a wide range of supported option types, filtering commands accordingly and notifying the user when some are wrong or haven't specified, if set as required.
STRING = 0, // Option has to be a string, either a word or "a sentence"
INTEGER = 1, // Integer type, no floating point allowed.
FLOAT = 2, // Float type, no integer allowed.
NUMBER = 3, // Floats & Integers are allowed.
SIGNED_32_INTEGER = 4, // Integer: -2147483648 to 2147483647
USER = 5, // User mention allowed
ROLE = 6 // Role mention allowed
CHANNEL = 7, // Channel mention allowed
// Image, or any embedded attchment that is found within the message content
EMBEDDED_ATTACHMENT = 8,
BOOLEAN = 9, // true or false (1 and 0 allowed)
EMOTE = 10, // Emote allowed