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])); }