mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-17 11:48:17 +00:00
5f1b82a4e8
* fix(rest/process_request): use DiscordHTTPResponseCodes * refactor: remove RequestManager * refactor: remove RequestManager and use runMethod()
16 lines
536 B
TypeScript
16 lines
536 B
TypeScript
import { rest } from "../../rest/rest.ts";
|
|
import { endpoints } from "../../util/constants.ts";
|
|
import { requireBotGuildPermissions } from "../../util/permissions.ts";
|
|
|
|
/** Delete the attached integration object for the guild with this id. Requires MANAGE_GUILD permission. */
|
|
export async function deleteIntegration(guildId: string, id: string) {
|
|
await requireBotGuildPermissions(guildId, ["MANAGE_GUILD"]);
|
|
|
|
const result = await rest.runMethod(
|
|
"delete",
|
|
endpoints.GUILD_INTEGRATION(guildId, id),
|
|
);
|
|
|
|
return result;
|
|
}
|