nukes everything

This commit is contained in:
Skillz4Killz
2021-11-09 20:47:14 +00:00
committed by GitHub
parent ccd06bf2ac
commit cdb67ba95a
61 changed files with 156 additions and 751 deletions
+5 -5
View File
@@ -13,13 +13,13 @@ export async function getEmojiTest(bot: Bot, guildId: bigint, t: Deno.TestContex
assertExists(emoji);
// Delay the execution to allow event to be processed
await delayUntil(10000, async () => (await bot.cache.guilds.get(guildId))?.emojis?.has(emoji.id));
await delayUntil(10000, async () => bot.cache.guilds.get(guildId)?.emojis?.has(emoji.id));
if (!(await bot.cache.guilds.get(guildId))?.emojis?.has(emoji.id)) {
if (!bot.cache.guilds.get(guildId)?.emojis?.has(emoji.id)) {
throw new Error("The emoji seemed to be created but it was not cached.");
}
(await bot.cache.guilds.get(guildId))?.emojis?.delete(emoji.id);
bot.cache.guilds.get(guildId)?.emojis?.delete(emoji.id);
const getEmoji = await bot.helpers.getEmoji(guildId, emoji.id, true);
@@ -27,9 +27,9 @@ export async function getEmojiTest(bot: Bot, guildId: bigint, t: Deno.TestContex
assertExists(getEmoji);
// Delay the execution to allow event to be processed
await delayUntil(10000, async () => (await bot.cache.guilds.get(guildId))?.emojis?.has(emoji.id));
await delayUntil(10000, async () => bot.cache.guilds.get(guildId)?.emojis?.has(emoji.id));
if (!(await bot.cache.guilds.get(guildId))?.emojis?.has(emoji.id)) {
if (!bot.cache.guilds.get(guildId)?.emojis?.has(emoji.id)) {
throw new Error("The emoji didn't got added to cache after using the getEmoji function.");
}
}