> For the complete documentation index, see [llms.txt](https://guide.touchguild.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guide.touchguild.com/application-commands/registering.md).

# Registering

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.

Here's an example:

<pre class="language-typescript"><code class="lang-typescript"><strong>client.registerGlobalApplicationCommand({
</strong>            name:    "reminder",
            type:    ApplicationCommandType.CHAT_INPUT,
            options: [
                {
                    type:     ApplicationCommandOptionType.INTEGER,
                    name:     "minutes",
                    required: true
                },
                {
                    type:     ApplicationCommandOptionType.STRING,
                    name:     "message",
                    required: false
                },
            ]
    });
</code></pre>

To register multiple global commands, you can use the `bulkRegisterGlobalApplicationCommand` method.

## Guild commands

It is pretty much the same as Global commands but you have to pass the Guild ID inside the `registerGuildApplicationCommand` method.

<pre class="language-typescript"><code class="lang-typescript"><strong>client.registerGuildApplicationCommand(guildID, applicationCommand);
</strong></code></pre>

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:

```typescript
client.bulkRegisterGuildApplicationCommand([
    {
        name:    "reminder",
        type:    ApplicationCommandType.CHAT_INPUT,
        guildID: "INSERT GUILD ID",
        options: [
            {
                type:     ApplicationCommandOptionType.INTEGER,
                name:     "minutes",
                required: true
            },
            {
                type:     ApplicationCommandOptionType.STRING,
                name:     "message",
                required: false
            },
        ],
        // ..and more Application Commands
    }
]);
```

## User commands

It is pretty much the same as registering guild command(s), use the Client methdo called `registerGuildApplicationCommand`:

<pre class="language-typescript"><code class="lang-typescript"><strong>client.registerUserApplicationCommand(userID, applicationCommand);
</strong></code></pre>

and for bulk registering use `bulkRegisterUserApplicationCommand` and specify the User ID for each command:&#x20;

```typescript
client.bulkRegisterUserApplicationCommand([
    {
        name:    "reminder",
        type:    ApplicationCommandType.CHAT_INPUT,
        userID: "INSERT USER ID",
        options: [
            {
                type:     ApplicationCommandOptionType.INTEGER,
                name:     "minutes",
                required: true
            },
            {
                type:     ApplicationCommandOptionType.STRING,
                name:     "message",
                required: false
            },
        ],
        // ..and more Application Commands
    }
]);
```

## Command Option Types

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.

<pre class="language-typescript"><code class="lang-typescript">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 &#x26; 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
<strong>// Image, or any embedded attchment that is found within the message content
</strong>EMBEDDED_ATTACHMENT = 8,
BOOLEAN = 9, // true or false (1 and 0 allowed)
EMOTE = 10, // Emote allowed
</code></pre>

[Learn more on how to detect when Application Commands are executed.](/application-commands/command-interactions.md)
