diff --git a/src/helpers/interactions/commands/create_slash_command.ts b/src/helpers/interactions/commands/create_slash_command.ts index 6cce269ba..26a989827 100644 --- a/src/helpers/interactions/commands/create_slash_command.ts +++ b/src/helpers/interactions/commands/create_slash_command.ts @@ -17,7 +17,7 @@ import { snakelize, validateSlashCommands } from "../../../util/utils.ts"; * Guild commands update **instantly**. We recommend you use guild commands for quick testing, and global commands when they're ready for public use. */ export async function createSlashCommand(options: CreateGlobalApplicationCommand, guildId?: bigint) { - validateSlashCommands([options], true); + [options] = validateSlashCommands([options], true) as CreateGlobalApplicationCommand[]; return await rest.runMethod( "post", diff --git a/src/helpers/interactions/commands/upsert_slash_command.ts b/src/helpers/interactions/commands/upsert_slash_command.ts index 5c8ccb007..9b6c40e7e 100644 --- a/src/helpers/interactions/commands/upsert_slash_command.ts +++ b/src/helpers/interactions/commands/upsert_slash_command.ts @@ -9,7 +9,7 @@ import { validateSlashCommands } from "../../../util/utils.ts"; * Edit an existing slash command. If this command did not exist, it will create it. */ export async function upsertSlashCommand(commandId: bigint, options: EditGlobalApplicationCommand, guildId?: bigint) { - validateSlashCommands([options]); + [options] = validateSlashCommands([options]); return await rest.runMethod( "patch", diff --git a/src/helpers/interactions/commands/upsert_slash_commands.ts b/src/helpers/interactions/commands/upsert_slash_commands.ts index a42f06fe6..ff7bb29d3 100644 --- a/src/helpers/interactions/commands/upsert_slash_commands.ts +++ b/src/helpers/interactions/commands/upsert_slash_commands.ts @@ -11,7 +11,7 @@ import { validateSlashCommands } from "../../../util/utils.ts"; * **NOTE:** Any slash commands that are not specified in this function will be **deleted**. If you don't provide the commandId and rename your command, the command gets a new Id. */ export async function upsertSlashCommands(options: EditGlobalApplicationCommand[], guildId?: bigint) { - validateSlashCommands(options); + options = validateSlashCommands(options); return await rest.runMethod( "put",