Skip to content

DiscordApplication

The DiscordApplication class provides methods to interact with Discord application commands such as creating, deleting, editing, fetching, and setting global application commands.

Properties

id

DiscordApplication.id  :: string

flags

DiscordApplication.flags  :: number

id

DiscordApplication.id  :: string

flags

DiscordApplication.flags  :: number

Methods

createSlashCommandAsync

DiscordApplication : createSlashCommandAsync (

     command: CommandBuilder.CommandBuilder The command to create.
)  -> Vendor.Future<CommandResponse>

Creates a new slash command for the Discord application.

deleteSlashCommandAsync

DiscordApplication : deleteSlashCommandAsync (

     commandId: string The ID of the command to delete.
)  -> Vendor.Future<CommandResponse>

Deletes an existing slash command from the Discord application.

editSlashCommandAsync

DiscordApplication : editSlashCommandAsync (

     commandId: string The ID of the command to edit.
     command: CommandBuilder.CommandBuilder The updated command data.
)  -> Vendor.Future<CommandResponse>

Edits an existing slash command for the Discord application.

fetchSlashCommandsAsync

DiscordApplication : fetchSlashCommandsAsync ()  -> Vendor.Future<{ApplicationCommand}>

Fetches all existing slash commands for the Discord application.

setSlashCommandsAsync

DiscordApplication : setSlashCommandsAsync ( )  -> Vendor.Future<nil>

Sets the slash commands for the Discord application, updating existing ones and creating or deleting as necessary.

Functions

new

DiscordApplication . new (

     discordClient: any The Discord client instance.
     applicationData: {
       id: string,
       flags: number,
    }
)  -> ()

Creates a new instance of the DiscordApplication.