Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
function upsertGuildApplicationCommands
import { upsertGuildApplicationCommands } from "https://deno.land/x/discordeno@17.0.1/helpers/interactions/commands/upsertGuildApplicationCommands.ts";

Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.

Parameters

bot: Bot
  • The bot instance to use to make the request.
guildId: BigString
  • The ID of the guild whose list of commands to overwrite.
commands: CreateApplicationCommand[]
  • The list of commands to use to overwrite the previous list.

Returns

Promise<Collection<bigint, ApplicationCommand>>

A collection of ApplicationCommand objects assorted by command ID.