swc/crates/swc_bundler/tests/.cache/deno/bb41bbd8c37463b923bbb7b9979a929542f814ac.ts
2021-11-09 20:42:49 +09:00

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)
);
}