cleanup caching on few events

This commit is contained in:
Skillz4Killz
2021-11-09 17:24:22 +00:00
committed by GitHub
parent 4d845db515
commit c6574fb92c
21 changed files with 67 additions and 164 deletions
+1 -4
View File
@@ -6,8 +6,5 @@ import { SnakeCasedPropertiesDeep } from "../../types/util.ts";
export async function handleMessageCreate(bot: Bot, data: DiscordGatewayPayload) {
const payload = data.d as SnakeCasedPropertiesDeep<Message>;
const message = bot.transformers.message(bot, payload);
await bot.cache.messages.set(message.id, message);
bot.events.messageCreate(bot, message);
bot.events.messageCreate(bot, bot.transformers.message(bot, payload));
}