From 5451c1ad952da967c95050644066427bf6a743de Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:31:38 +0200 Subject: [PATCH] Update upsert_slash_commands.ts --- src/helpers/commands/upsert_slash_commands.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/helpers/commands/upsert_slash_commands.ts b/src/helpers/commands/upsert_slash_commands.ts index ce0bdeee2..bf2b78343 100644 --- a/src/helpers/commands/upsert_slash_commands.ts +++ b/src/helpers/commands/upsert_slash_commands.ts @@ -1,6 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; import { EditGlobalApplicationCommand } from "../../types/interactions/edit_global_application_command.ts"; +import { ApplicationCommand } from "../../types/mod.ts"; import { endpoints } from "../../util/constants.ts"; import { validateSlashCommands } from "../../util/utils.ts"; @@ -15,13 +16,11 @@ export async function upsertSlashCommands( ) { validateSlashCommands(options); - const result = await rest.runMethod( + return await rest.runMethod( "put", guildId ? endpoints.COMMANDS_GUILD(applicationId, guildId) : endpoints.COMMANDS(applicationId), options, ); - - return result; }