mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 09:20:08 +00:00
10 lines
475 B
TypeScript
10 lines
475 B
TypeScript
import type { Integration } from "../../types/integrations/integration.ts";
|
|
import type { Bot } from "../../bot.ts";
|
|
|
|
/** Returns a list of integrations for the guild. Requires the MANAGE_GUILD permission. */
|
|
export async function getIntegrations(bot: Bot, guildId: bigint) {
|
|
await bot.utils.requireBotGuildPermissions(bot, guildId, ["MANAGE_GUILD"]);
|
|
|
|
return await bot.rest.runMethod<Integration>(bot.rest, "get", bot.constants.endpoints.GUILD_INTEGRATIONS(guildId));
|
|
}
|