mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-31 16:00:07 +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>
14 lines
639 B
TypeScript
14 lines
639 B
TypeScript
import { MfaLevels } from "../../mod.ts";
|
|
import { assertEquals } from "../deps.ts";
|
|
import { loadBot } from "../mod.ts";
|
|
|
|
Deno.test("[guild] edit guild mfa level", async () => {
|
|
const bot = loadBot();
|
|
const guild = await bot.helpers.createGuild({ name: "test" });
|
|
await bot.helpers.editGuildMfaLevel(guild.id, MfaLevels.Elevated, "test");
|
|
assertEquals((await bot.helpers.getGuild(guild.id)).mfaLevel, MfaLevels.Elevated);
|
|
await bot.helpers.editGuildMfaLevel(guild.id, MfaLevels.None, "revert test");
|
|
assertEquals((await bot.helpers.getGuild(guild.id)).mfaLevel, MfaLevels.None);
|
|
await bot.helpers.deleteGuild(guild.id);
|
|
});
|