Fix comments

This commit is contained in:
Quentin Nicolini
2021-10-30 13:56:56 +02:00
parent 4720fd0c77
commit 96fd804628
+2 -2
View File
@@ -16,12 +16,12 @@ async function ifItFailsBlameWolf(bot: Bot, channelId: bigint, reason?: string)
throw new Error(`The message seemed to be sent but it was not cached. Reason: ${reason}`); throw new Error(`The message seemed to be sent but it was not cached. Reason: ${reason}`);
} }
// Delete the message now // Delete the messages now
await bot.helpers.deleteMessages(channelId, [message.id, secondMessage.id], reason); await bot.helpers.deleteMessages(channelId, [message.id, secondMessage.id], reason);
// Wait to give it time for MESSAGE_DELETE event // Wait to give it time for MESSAGE_DELETE event
await delayUntil(10000, () => !bot.cache.messages.has(message.id) && !bot.cache.messages.has(secondMessage.id)); await delayUntil(10000, () => !bot.cache.messages.has(message.id) && !bot.cache.messages.has(secondMessage.id));
// Make sure it is gone from cache // Make sure they are gone from cache
if (bot.cache.messages.has(message.id) || bot.cache.messages.has(secondMessage.id)) { if (bot.cache.messages.has(message.id) || bot.cache.messages.has(secondMessage.id)) {
throw new Error("The messages should have been deleted but they are still in cache."); throw new Error("The messages should have been deleted but they are still in cache.");
} }