mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
chore: deno fmt
This commit is contained in:
@@ -5,13 +5,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(
|
||||
"get",
|
||||
guildId
|
||||
? endpoints.COMMANDS_GUILD(applicationId, guildId)
|
||||
: endpoints.COMMANDS(applicationId),
|
||||
)) as SlashCommand[];
|
||||
const result = (await rest.runMethod(
|
||||
"get",
|
||||
guildId
|
||||
? endpoints.COMMANDS_GUILD(applicationId, guildId)
|
||||
: endpoints.COMMANDS(applicationId),
|
||||
)) as SlashCommand[];
|
||||
|
||||
return new Collection(result.map((command) => [command.name, command]));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user