From 36dc14523b34620b150acdd0f790db49d03b1b81 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:27:45 +0200 Subject: [PATCH] Update create_slash_command.ts --- src/helpers/commands/create_slash_command.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/helpers/commands/create_slash_command.ts b/src/helpers/commands/create_slash_command.ts index 8baa84490..2da719f56 100644 --- a/src/helpers/commands/create_slash_command.ts +++ b/src/helpers/commands/create_slash_command.ts @@ -1,6 +1,7 @@ import { applicationId } from "../../bot.ts"; import { rest } from "../../rest/rest.ts"; import { CreateGlobalApplicationCommand } from "../../types/interactions/create_global_application_command.ts"; +import { ApplicationCommand } from "../../types/mod.ts"; import { endpoints } from "../../util/constants.ts"; import { camelKeysToSnakeCase, @@ -24,13 +25,11 @@ export async function createSlashCommand( ) { validateSlashCommands([options], true); - const result = await rest.runMethod( + return await rest.runMethod( "post", guildId ? endpoints.COMMANDS_GUILD(applicationId, guildId) : endpoints.COMMANDS(applicationId), camelKeysToSnakeCase(options), ); - - return result; }