From 653e608d0ef03ba26d688e84229d821eb6313c37 Mon Sep 17 00:00:00 2001 From: ITOH <72305210+itohatweb@users.noreply.github.com> Date: Fri, 23 Apr 2021 23:27:56 +0200 Subject: [PATCH] Update get_slash_commands.ts --- src/helpers/commands/get_slash_commands.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/commands/get_slash_commands.ts b/src/helpers/commands/get_slash_commands.ts index 3337baf49..4b4de42d1 100644 --- a/src/helpers/commands/get_slash_commands.ts +++ b/src/helpers/commands/get_slash_commands.ts @@ -6,12 +6,12 @@ import { endpoints } from "../../util/constants.ts"; /** Fetch all of the global commands for your application. */ export async function getSlashCommands(guildId?: string) { - const result = (await rest.runMethod( + const result = await rest.runMethod( "get", guildId ? endpoints.COMMANDS_GUILD(applicationId, guildId) : endpoints.COMMANDS(applicationId), - )) as ApplicationCommand[]; + ); return new Collection(result.map((command) => [command.name, command])); }