mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
fmt files damn son
This commit is contained in:
@@ -5,7 +5,7 @@ import { DiscordChannelTypes } from "../../src/types/channels/channel_types.ts";
|
||||
import { CreateGuildChannel } from "../../src/types/guilds/create_guild_channel.ts";
|
||||
import { createChannel } from "../../src/helpers/channels/create_channel.ts";
|
||||
import { delayUntil } from "../util/delay_until.ts";
|
||||
import { DiscordOverwriteTypes } from "../../src/types/channels/overwrite_types.ts"
|
||||
import { DiscordOverwriteTypes } from "../../src/types/channels/overwrite_types.ts";
|
||||
import { botId } from "../../src/bot.ts";
|
||||
import { deleteChannelOverwrite } from "../../src/helpers/channels/delete_channel_overwrite.ts";
|
||||
|
||||
@@ -23,19 +23,25 @@ async function ifItFailsBlameWolf(options: CreateGuildChannel, save = false) {
|
||||
throw new Error("The channel seemed to be created but it was not cached.");
|
||||
}
|
||||
|
||||
if (options.permissionOverwrites && channel.permissionOverwrites.length !== options.permissionOverwrites.length) {
|
||||
if (
|
||||
options.permissionOverwrites &&
|
||||
channel.permissionOverwrites.length !== options.permissionOverwrites.length
|
||||
) {
|
||||
throw new Error(
|
||||
"The channel was supposed to have a permissionOverwrites but it does not appear to be the same permissionOverwrites."
|
||||
"The channel was supposed to have a permissionOverwrites but it does not appear to be the same permissionOverwrites.",
|
||||
);
|
||||
}
|
||||
|
||||
await deleteChannelOverwrite(channel.guildId, channel.id, botId);
|
||||
|
||||
await delayUntil(10000, () => cache.channels.get(channel.id)?.permissionOverwrites?.length === 0);
|
||||
await delayUntil(
|
||||
10000,
|
||||
() => cache.channels.get(channel.id)?.permissionOverwrites?.length === 0,
|
||||
);
|
||||
|
||||
if (cache.channels.get(channel.id)?.permissionOverwrites?.length !== 0) {
|
||||
throw new Error(
|
||||
"The channel permission overwrite was supposed to be deleted but it does not appear to be."
|
||||
"The channel permission overwrite was supposed to be deleted but it does not appear to be.",
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -55,7 +61,7 @@ Deno.test({
|
||||
},
|
||||
],
|
||||
},
|
||||
true
|
||||
true,
|
||||
);
|
||||
},
|
||||
...defaultTestOptions,
|
||||
|
||||
Reference in New Issue
Block a user