mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
17 lines
444 B
TypeScript
17 lines
444 B
TypeScript
import { applicationId } from "../../bot.ts";
|
|
import { rest } from "../../rest/rest.ts";
|
|
import { endpoints } from "../../util/constants.ts";
|
|
|
|
/** Deletes a slash command. */
|
|
export async function deleteSlashCommand(
|
|
id: string,
|
|
guildId?: string,
|
|
) {
|
|
return await rest.runMethod<undefined>(
|
|
"delete",
|
|
guildId
|
|
? endpoints.COMMANDS_GUILD_ID(applicationId, guildId, id)
|
|
: endpoints.COMMANDS_ID(applicationId, id),
|
|
);
|
|
}
|