mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-02 17:00:08 +00:00
* add modifyGuildMfaLevel * plugins/permissions: editGuildMfaLevel * tests/guilds: editGuildMfaLevel * helpers/guilds: editGuuldMfaLevel return void * editGuildMfaLevel return void * Update plugins/permissions/src/guilds/editGuildMfaLevel.ts * tests/guilds: fix editGuildMfaLevel CACHED_COMMUNITY_GUILD_ID is not owned by the bot Co-authored-by: Skillz4Killz <23035000+Skillz4Killz@users.noreply.github.com>
13 lines
424 B
TypeScript
13 lines
424 B
TypeScript
import type { Bot } from "../../mod.ts";
|
|
import type { MfaLevels } from "../../types/shared.ts";
|
|
|
|
/** Modify a guild's MFA level. Requires guild ownership. */
|
|
export async function editGuildMfaLevel(bot: Bot, guildId: bigint, mfaLevel: MfaLevels, reason?: string) {
|
|
return await bot.rest.runMethod<void>(
|
|
bot.rest,
|
|
"POST",
|
|
bot.constants.routes.GUILD_MFA_LEVEL(guildId),
|
|
{ level: mfaLevel, reason },
|
|
);
|
|
}
|