Skip to main content
Module

x/harmony/deploy.ts>ApplicationCommandsManager

An easy to use Discord API Library for Deno.
Latest
class ApplicationCommandsManager
Re-export
import { ApplicationCommandsManager } from "https://deno.land/x/harmony@v2.9.0/deploy.ts";

Manages Slash Commands, allows fetching/modifying/deleting/creating Slash Commands.

Constructors

new
ApplicationCommandsManager(client: InteractionsClient)

Properties

readonly
rest: RESTManager
readonly
slash: InteractionsClient

Methods

all(): Promise<Collection<string, ApplicationCommand>>

Get all Global Slash Commands

bulkEdit(cmds: Array<ApplicationCommandPartial & { id?: string; }>, guild?: Guild | string): Promise<Collection<string, ApplicationCommand>>

Bulk Edit Global or Guild Slash Commands

create(data: ApplicationCommandPartial, guild?: Guild | string): Promise<ApplicationCommand>

Create a Slash Command (global or Guild)

delete(id: string, guild?: Guild | string): Promise<ApplicationCommandsManager>

Delete a Slash Command (global or Guild)

edit(
id: string,
guild?: Guild | string,
): Promise<ApplicationCommand>

Edit a Slash Command (global or Guild)

get(id: string, guild?: Guild | string): Promise<ApplicationCommand>

Get a Slash Command (global or Guild)

guild(guild: Guild | string): Promise<Collection<string, ApplicationCommand>>

Get a Guild's Slash Commands

[Symbol.asyncIterator](): AsyncIterableIterator<ApplicationCommand>