Files
discordeno/helpers/interactions/commands/deleteGlobalApplicationCommand.ts
Skillz4Killz 3a5bdce32d feat: helpers support strings in args (#2478)
* fix: helpers support strings in args

* fix: fmt
2022-09-15 20:59:02 -05:00

19 lines
650 B
TypeScript

import type { Bot } from "../../../bot.ts";
import { BigString } from "../../../types/shared.ts";
/**
* Deletes an application command registered globally.
*
* @param bot - The bot instance to use to make the request.
* @param commandId - The ID of the command to delete.
*
* @see {@link https://discord.com/developers/docs/interactions/application-commands#delete-global-application-command}
*/
export async function deleteGlobalApplicationCommand(bot: Bot, commandId: BigString): Promise<void> {
return await bot.rest.runMethod<void>(
bot.rest,
"DELETE",
bot.constants.routes.COMMANDS_ID(bot.applicationId, commandId),
);
}