Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/harmony/src/interactions/mod.ts>ApplicationCommandsManager

An easy to use Discord API Library for Deno.
Go to Latest
class ApplicationCommandsManager
Re-export
import { ApplicationCommandsManager } from "https://deno.land/x/harmony@v2.8.0/src/interactions/mod.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>