mirror of
https://github.com/swc-project/swc.git
synced 2024-12-26 07:02:28 +03:00
15 lines
551 B
TypeScript
15 lines
551 B
TypeScript
// Loaded from https://deno.land/x/discordeno@11.0.0-rc.2/src/helpers/interactions/commands/delete_slash_command.ts
|
|
|
|
|
|
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: bigint, guildId?: bigint) {
|
|
return await rest.runMethod<undefined>(
|
|
"delete",
|
|
guildId ? endpoints.COMMANDS_GUILD_ID(applicationId, guildId, id) : endpoints.COMMANDS_ID(applicationId, id)
|
|
);
|
|
}
|