mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 03:18:17 +00:00
Update THREAD_UPDATE.ts
This commit is contained in:
@@ -3,10 +3,14 @@ import { cacheHandlers } from "../../cache.ts";
|
||||
import { structures } from "../../structures/mod.ts";
|
||||
import { Channel } from "../../types/channels/channel.ts";
|
||||
import { DiscordGatewayPayload } from "../../types/gateway/gateway_payload.ts";
|
||||
import { snowflakeToBigint } from "../../util/bigint.ts";
|
||||
|
||||
export async function handleThreadUpdate(data: DiscordGatewayPayload) {
|
||||
const payload = data.d as Channel;
|
||||
const oldChannel = await cacheHandlers.get("channels", payload.id);
|
||||
const oldChannel = await cacheHandlers.get(
|
||||
"channels",
|
||||
snowflakeToBigint(payload.id),
|
||||
);
|
||||
if (!oldChannel) return;
|
||||
|
||||
const discordenoChannel = await structures.createDiscordenoChannel(payload);
|
||||
|
||||
Reference in New Issue
Block a user