A class to deploy slash commands to Discord. It can deploy globally or to a single guild. Keep in mind that deploying globally can take up to 1 hour for changes to take effect, while deploying for a single guild is immediate.

Hierarchy

  • SlashCommandDeployer

Constructors

Properties

The client that this deployer will use.

Memberof

SlashCommandDeployer

rest: REST

A rest client to interact with the Discord API.

Memberof

SlashCommandDeployer

Methods

  • Deploy the commands registered to this deployer's client registry globally. Keep in mind that changes may take up to 1 hour to take effect.

    Returns Promise<void>

    A promise that resolves once all the commands have been deployed.

    Emits

    client#commandDeployed

    Emits

    client#error

  • Deploy the commands registered to this deployer's client registry to a given guild.

    Parameters

    • guildID: string

      The ID of the guild to deploy the commands to.

    Returns Promise<void>

    A promise that resolves once all the commands have been deployed.

    Emits

    client#commandDeployed

    Emits

    client#error

  • Deploy the commands registered to this deployer's client registry to multiple guilds.

    Parameters

    • guildIDs: string[]

      An array with the IDs of the guilds to deploy the commands to.

    Returns Promise<void[]>

    A promise that resolves once all the commands have been deployed.

    Emits

    client#commandDeployed

    Emits

    client#error

  • Deploy the commands registered to this deployer's client registry to the testing guild defined in the client.

    Returns Promise<void>

    A promise that resolves once all the commands have been deployed.

    Emits

    client#commandDeployed

    Emits

    client#error

Generated using TypeDoc