mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Fix comments
This commit is contained in:
@@ -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.");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user