Skip to content

Instantly share code, notes, and snippets.

@advaith1
Last active September 27, 2025 00:18
Show Gist options
  • Save advaith1/287e69c3347ef5165c0dbde00aa305d2 to your computer and use it in GitHub Desktop.
Save advaith1/287e69c3347ef5165c0dbde00aa305d2 to your computer and use it in GitHub Desktop.

Revisions

  1. advaith1 revised this gist May 7, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ Official resources:
    * [v13 update guide](https://deploy-preview-551--discordjs-guide.netlify.app/additional-info/changes-in-v13.html)
    * [d.js Slash Command Docs](https://discord.js.org/#/docs/main/master/examples/commands)
    * [Registering Commands Guide](https://deploy-preview-638--discordjs-guide.netlify.app/interactions/registering-slash-commands.html)
    * [Replying to Commands Guide](https://deploy-preview-638--discordjs-guide.netlify.app/interactions/replying-to-slash-commands.html)\
    * [Replying to Commands Guide](https://deploy-preview-638--discordjs-guide.netlify.app/interactions/replying-to-slash-commands.html)

    For help with official slash command support, [go to the Discord.js server](https://discord.gg/djs) and ask in #djs-master-branch.

  2. advaith1 revised this gist May 7, 2021. 1 changed file with 16 additions and 0 deletions.
    16 changes: 16 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,19 @@
    # Discord.js slash command support has been merged!

    The discord.js [interactions PR](https://github.com/discordjs/discord.js/pull/5448) has been merged, and d.js master (v13 dev) now has proper support for slash commands!

    Official resources:
    * [v13 update guide](https://deploy-preview-551--discordjs-guide.netlify.app/additional-info/changes-in-v13.html)
    * [d.js Slash Command Docs](https://discord.js.org/#/docs/main/master/examples/commands)
    * [Registering Commands Guide](https://deploy-preview-638--discordjs-guide.netlify.app/interactions/registering-slash-commands.html)
    * [Replying to Commands Guide](https://deploy-preview-638--discordjs-guide.netlify.app/interactions/replying-to-slash-commands.html)\

    For help with official slash command support, [go to the Discord.js server](https://discord.gg/djs) and ask in #djs-master-branch.

    If you are using `client.api` you should switch over to official support. The following legacy information is **not recommended or supported** for use.

    ---

    # Slash Commands in Discord.js

    These are some simple examples for using Slash Commands in discord.js.
  3. advaith1 revised this gist Apr 13, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a pr](https://github.com/discordjs/discord.js/pull/5448)) but you can still use the underlying api and websocket to use them.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support. **Do not ask for help with client.api in the discord.js server.**

    **Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.**

  4. advaith1 revised this gist Apr 6, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Slash Commands in Discord.js

    These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr](https://github.com/discordjs/discord.js/pull/5106)) but you can still use the underlying api and websocket to use them.
    discord.js doesn't have full support for slash commands yet ([there's a pr](https://github.com/discordjs/discord.js/pull/5448)) but you can still use the underlying api and websocket to use them.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.

    **Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.**
  5. advaith1 revised this gist Mar 7, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -56,9 +56,8 @@ client.api.interactions(interaction.id, interaction.token).callback.post({data:
    type: 4,
    data: {
    content: 'hello world!'
    }
    }
    })
    }})
    ```

    ## Sending a Followup Message
  6. advaith1 revised this gist Feb 26, 2021. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -4,20 +4,22 @@ These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr](https://github.com/discordjs/discord.js/pull/5106)) but you can still use the underlying api and websocket to use them.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.
    **Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.**

    Note that slash commands won't show in a server unless that server has authorized it with the `applications.commands` oauth2 scope (not just the `bot` scope).

    This does not require a discord.js update! It should work as long as you're using a modern version (anything v12 would probably work, obviously v12.5.1/latest is recommended)

    > Alternatively, you can manage commands and handle interactions with [slash-create](https://github.com/Snazzah/slash-create).
    ## Registering a Command:
    You only need to register each command one time. You might wanna use an eval command for this.

    Alternatively, instead of using discord.js to create the command, you might want to use a UI tool such as [Postman](https://getpostman.com)
    > Alternatively, instead of using discord.js to create the command, you might want to use a UI tool such as [Postman](https://getpostman.com), or create them in your code with [discord-slash-commands](https://github.com/MeguminSama/discord-slash-commands)
    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object

    > For help creating the command object json, try https://rauf.wtf/slash/
    > For help creating the command object json, try https://rauf.wtf/slash
    if your application id and bot id are different, change client.user.id to the application id
    ### Global Commands
  7. advaith1 revised this gist Feb 25, 2021. 1 changed file with 7 additions and 0 deletions.
    7 changes: 7 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -59,4 +59,11 @@ client.api.interactions(interaction.id, interaction.token).callback.post({data:
    })
    ```

    ## Sending a Followup Message
    this also goes inside the "receiving the event" block.
    see [Webhook#send docs](https://discord.js.org/#/docs/main/master/class/Webhook?scrollTo=send)
    ```js
    new Discord.WebhookClient(client.user.id, interaction.token).send('hello world')
    ```

    shortlink: [s.advaith.io/slashdjs](https://s.advaith.io/slashdjs)
  8. advaith1 revised this gist Feb 12, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,8 @@ Alternatively, instead of using discord.js to create the command, you might want

    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object

    > For help creating the command object json, try https://rauf.wtf/slash/
    if your application id and bot id are different, change client.user.id to the application id
    ### Global Commands
    global commands show in all authorized servers, but take up to an hour to deploy.
  9. advaith1 revised this gist Feb 12, 2021. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -13,6 +13,8 @@ This does not require a discord.js update! It should work as long as you're usin
    ## Registering a Command:
    You only need to register each command one time. You might wanna use an eval command for this.

    Alternatively, instead of using discord.js to create the command, you might want to use a UI tool such as [Postman](https://getpostman.com)

    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object

    if your application id and bot id are different, change client.user.id to the application id
  10. advaith1 revised this gist Dec 16, 2020. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -14,10 +14,11 @@ This does not require a discord.js update! It should work as long as you're usin
    You only need to register each command one time. You might wanna use an eval command for this.

    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object

    if your application id and bot id are different, change client.user.id to the application id
    ### Global Commands
    global commands show in all authorized servers, but take up to an hour to deploy.
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).commands.post({data: {
    name: 'ping',
    description: 'ping pong!'
    @@ -27,7 +28,6 @@ client.api.applications(client.user.id).commands.post({data: {
    ### Guild-specific commands
    guild commands deploy immediately - use these for testing
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).guilds('guild id').commands.post({data: {
    name: 'ping',
    description: 'ping pong!'
  11. advaith1 revised this gist Dec 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,7 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    ## Receiving the Event
    `interaction` is an [Interaction object](https://discord.com/developers/docs/interactions/slash-commands#interaction)
    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    client.ws.on('INTERACTION_CREATE', async interaction => {
    // do stuff and respond here
    })
    ```
  12. advaith1 revised this gist Dec 16, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,8 @@ Please read [Discord's Slash Command docs](https://discord.com/developers/docs/i

    Note that slash commands won't show in a server unless that server has authorized it with the `applications.commands` oauth2 scope (not just the `bot` scope).

    This does not require a discord.js update! It should work as long as you're using a modern version (anything v12 would probably work, obviously v12.5.1/latest is recommended)

    ## Registering a Command:
    You only need to register each command one time. You might wanna use an eval command for this.

  13. advaith1 revised this gist Dec 16, 2020. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -36,11 +36,12 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    `interaction` is an [Interaction object](https://discord.com/developers/docs/interactions/slash-commands#interaction)
    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {

    // do stuff and respond here
    })
    ```

    ## Responding To An Interaction:
    this goes inside the "receiving the event" block.
    send an [Interaction Response](https://discord.com/developers/docs/interactions/slash-commands#interaction-interaction-response) object
    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
  14. advaith1 revised this gist Dec 16, 2020. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,11 @@ Please read [Discord's Slash Command docs](https://discord.com/developers/docs/i

    Note that slash commands won't show in a server unless that server has authorized it with the `applications.commands` oauth2 scope (not just the `bot` scope).

    ## registering a command:
    ## Registering a Command:
    You only need to register each command one time. You might wanna use an eval command for this.

    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object
    ### global commands
    ### Global Commands
    global commands show in all authorized servers, but take up to an hour to deploy.
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -22,7 +22,7 @@ client.api.applications(client.user.id).commands.post({data: {
    }})
    ```

    ### guild-specific commands:
    ### Guild-specific commands
    guild commands deploy immediately - use these for testing
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -32,15 +32,15 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    }})
    ```

    ## receiving the event:
    ## Receiving the Event
    `interaction` is an [Interaction object](https://discord.com/developers/docs/interactions/slash-commands#interaction)
    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {

    })
    ```

    ## responding to an interaction:
    ## Responding To An Interaction:
    send an [Interaction Response](https://discord.com/developers/docs/interactions/slash-commands#interaction-interaction-response) object
    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
  15. advaith1 revised this gist Dec 16, 2020. 1 changed file with 5 additions and 5 deletions.
    10 changes: 5 additions & 5 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -8,11 +8,11 @@ Please read [Discord's Slash Command docs](https://discord.com/developers/docs/i

    Note that slash commands won't show in a server unless that server has authorized it with the `applications.commands` oauth2 scope (not just the `bot` scope).

    ### registering a command:
    ## registering a command:
    You only need to register each command one time. You might wanna use an eval command for this.

    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object
    #### global commands
    ### global commands
    global commands show in all authorized servers, but take up to an hour to deploy.
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -22,7 +22,7 @@ client.api.applications(client.user.id).commands.post({data: {
    }})
    ```

    #### guild-specific commands:
    ### guild-specific commands:
    guild commands deploy immediately - use these for testing
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -32,15 +32,15 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    }})
    ```

    ### receiving the event:
    ## receiving the event:
    `interaction` is an [Interaction object](https://discord.com/developers/docs/interactions/slash-commands#interaction)
    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {

    })
    ```

    ### responding to an interaction:
    ## responding to an interaction:
    send an [Interaction Response](https://discord.com/developers/docs/interactions/slash-commands#interaction-interaction-response) object
    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
  16. advaith1 revised this gist Dec 16, 2020. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -6,6 +6,8 @@ Note that discord.js doesn't officially support using client.api, this is basica

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.

    Note that slash commands won't show in a server unless that server has authorized it with the `applications.commands` oauth2 scope (not just the `bot` scope).

    ### registering a command:
    You only need to register each command one time. You might wanna use an eval command for this.

  17. advaith1 revised this gist Dec 16, 2020. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -20,7 +20,7 @@ client.api.applications(client.user.id).commands.post({data: {
    }})
    ```

    #### registering a guild-specific command:
    #### guild-specific commands:
    guild commands deploy immediately - use these for testing
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -48,4 +48,6 @@ client.api.interactions(interaction.id, interaction.token).callback.post({data:
    }
    }
    })
    ```
    ```

    shortlink: [s.advaith.io/slashdjs](https://s.advaith.io/slashdjs)
  18. advaith1 revised this gist Dec 16, 2020. 1 changed file with 8 additions and 5 deletions.
    13 changes: 8 additions & 5 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -1,16 +1,17 @@
    # Slash Commands in Discord.js

    These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr]()) but you can still use the underlying api and websocket to use them.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr](https://github.com/discordjs/discord.js/pull/5106)) but you can still use the underlying api and websocket to use them.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.

    ### registering a global command:

    ### registering a command:
    You only need to register each command one time. You might wanna use an eval command for this.

    global commands take up to an hour to deploy.
    Send a [Command](https://discord.com/developers/docs/interactions/slash-commands#applicationcommand) object
    #### global commands
    global commands show in all authorized servers, but take up to an hour to deploy.
    ```js
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).commands.post({data: {
    @@ -30,13 +31,15 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    ```

    ### receiving the event:
    `interaction` is an [Interaction object](https://discord.com/developers/docs/interactions/slash-commands#interaction)
    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    // interaction is an Interaction object https://discord.dev/interactions/slash-commands#interaction

    })
    ```

    ### responding to an interaction:
    send an [Interaction Response](https://discord.com/developers/docs/interactions/slash-commands#interaction-interaction-response) object
    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
    type: 4,
  19. advaith1 revised this gist Dec 16, 2020. 1 changed file with 3 additions and 5 deletions.
    8 changes: 3 additions & 5 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -10,18 +10,18 @@ Please read [Discord's Slash Command docs](https://discord.com/developers/docs/i

    You only need to register each command one time. You might wanna use an eval command for this.

    global commands take up to an hour to deploy.
    ```js
    // global commands take up to an hour to deploy
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).commands.post({data: {
    name: 'ping',
    description: 'ping pong!'
    }})
    ```

    #### registering a guild command:
    #### registering a guild-specific command:
    guild commands deploy immediately - use these for testing
    ```js
    // guild commands deploy immediately - use these for testing
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).guilds('guild id').commands.post({data: {
    name: 'ping',
    @@ -30,15 +30,13 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    ```

    ### receiving the event:

    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    // interaction is an Interaction object https://discord.dev/interactions/slash-commands#interaction
    })
    ```

    ### responding to an interaction:

    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
    type: 4,
  20. advaith1 revised this gist Dec 16, 2020. 1 changed file with 10 additions and 8 deletions.
    18 changes: 10 additions & 8 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -6,16 +6,10 @@ Note that discord.js doesn't officially support using client.api, this is basica

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.

    ### receiving the event:

    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    // interaction is an Interaction object https://discord.dev/interactions/slash-commands#interaction
    })
    ```

    ### registering a global command:

    You only need to register each command one time. You might wanna use an eval command for this.

    ```js
    // global commands take up to an hour to deploy
    // if your application id and bot id are different, change client.user.id to the application id
    @@ -35,6 +29,14 @@ client.api.applications(client.user.id).guilds('guild id').commands.post({data:
    }})
    ```

    ### receiving the event:

    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    // interaction is an Interaction object https://discord.dev/interactions/slash-commands#interaction
    })
    ```

    ### responding to an interaction:

    ```js
  21. advaith1 revised this gist Dec 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,7 @@ client.api.applications(client.user.id).commands.post({data: {
    }})
    ```

    registering a guild command:
    #### registering a guild command:
    ```js
    // guild commands deploy immediately - use these for testing
    // if your application id and bot id are different, change client.user.id to the application id
  22. advaith1 revised this gist Dec 16, 2020. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@

    These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr]()) but you can still use the underlying api and websocket to use them.
    Note that discortd.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.
    Note that discord.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.

  23. advaith1 created this gist Dec 16, 2020.
    48 changes: 48 additions & 0 deletions discordjs-slash-commands.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    # Slash Commands in Discord.js

    These are some simple examples for using Slash Commands in discord.js.
    discord.js doesn't have full support for slash commands yet ([there's a wip pr]()) but you can still use the underlying api and websocket to use them.
    Note that discortd.js doesn't officially support using client.api, this is basically just a workaround until they fully release support.

    Please read [Discord's Slash Command docs](https://discord.com/developers/docs/interactions/slash-commands) since they have actual docs and details for slash commands; the code examples below are just how you can implement it using discord.js.

    ### receiving the event:

    ```js
    client.ws.on("INTERACTION_CREATE", async interaction => {
    // interaction is an Interaction object https://discord.dev/interactions/slash-commands#interaction
    })
    ```

    ### registering a global command:

    ```js
    // global commands take up to an hour to deploy
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).commands.post({data: {
    name: 'ping',
    description: 'ping pong!'
    }})
    ```

    registering a guild command:
    ```js
    // guild commands deploy immediately - use these for testing
    // if your application id and bot id are different, change client.user.id to the application id
    client.api.applications(client.user.id).guilds('guild id').commands.post({data: {
    name: 'ping',
    description: 'ping pong!'
    }})
    ```

    ### responding to an interaction:

    ```js
    client.api.interactions(interaction.id, interaction.token).callback.post({data: {
    type: 4,
    data: {
    content: 'hello world!'
    }
    }
    })
    ```