mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-03 01:10:07 +00:00
15 lines
536 B
TypeScript
15 lines
536 B
TypeScript
import { rest } from "../../rest/rest.ts";
|
|
import { Integration } from "../../types/mod.ts";
|
|
import { endpoints } from "../../util/constants.ts";
|
|
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
|
|
|
/** Returns a list of integrations for the guild. Requires the MANAGE_GUILD permission. */
|
|
export async function getIntegrations(guildId: string) {
|
|
await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]);
|
|
|
|
return await rest.runMethod<Integration>(
|
|
"get",
|
|
endpoints.GUILD_INTEGRATIONS(guildId),
|
|
);
|
|
}
|