Files
discordeno/helpers/interactions/commands/deleteApplicationCommand.ts
2022-02-11 09:49:53 +00:00

13 lines
408 B
TypeScript

import type { Bot } from "../../../bot.ts";
/** Deletes a application command. */
export async function deleteApplicationCommand(bot: Bot, id: bigint, guildId?: bigint) {
await bot.rest.runMethod<undefined>(
bot.rest,
"delete",
guildId
? bot.constants.endpoints.COMMANDS_GUILD_ID(bot.applicationId, guildId, id)
: bot.constants.endpoints.COMMANDS_ID(bot.applicationId, id),
);
}