mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Prettified Code!
This commit is contained in:
@@ -7,18 +7,12 @@ import { snowflakeToBigint } from "../../util/bigint.ts";
|
||||
export async function handleThreadDelete(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as Channel;
|
||||
|
||||
const cachedChannel = await cacheHandlers.get(
|
||||
"channels",
|
||||
snowflakeToBigint(payload.id)
|
||||
);
|
||||
const cachedChannel = await cacheHandlers.get("channels", snowflakeToBigint(payload.id));
|
||||
if (!cachedChannel) return;
|
||||
|
||||
await cacheHandlers.delete("channels", snowflakeToBigint(payload.id));
|
||||
cacheHandlers.forEach("messages", (message) => {
|
||||
eventHandlers.debug?.(
|
||||
"loop",
|
||||
`Running forEach messages loop in CHANNEL_DELTE file.`
|
||||
);
|
||||
eventHandlers.debug?.("loop", `Running forEach messages loop in CHANNEL_DELTE file.`);
|
||||
if (message.channelId === snowflakeToBigint(payload.id)) {
|
||||
cacheHandlers.delete("messages", message.id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user