mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 08:50:07 +00:00
13 lines
408 B
TypeScript
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),
|
|
);
|
|
}
|