This commit is contained in:
ITOH
2021-11-14 18:27:46 +01:00

View File

@@ -3,7 +3,8 @@ import type { Bot } from "../../../bot.ts";
/** Fetches the global command for the given Id. If a guildId is provided, the guild command will be fetched. */
export async function getSlashCommand(bot: Bot, commandId: bigint, guildId?: bigint) {
const result = await bot.rest.runMethod<ApplicationCommand>(bot.rest,
const result = await bot.rest.runMethod<ApplicationCommand>(
bot.rest,
"get",
guildId
? bot.constants.endpoints.COMMANDS_GUILD_ID(bot.applicationId, guildId, commandId)