mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 11:28:15 +00:00
Prettified Code!
This commit is contained in:
@@ -8,12 +8,12 @@ import { snowflakeToBigint } from "../../util/bigint.ts";
|
||||
|
||||
export async function handleGuildUpdate(
|
||||
data: DiscordGatewayPayload,
|
||||
shardId: number,
|
||||
shardId: number
|
||||
) {
|
||||
const payload = data.d as Guild;
|
||||
const oldGuild = await cacheHandlers.get(
|
||||
"guilds",
|
||||
snowflakeToBigint(payload.id),
|
||||
snowflakeToBigint(payload.id)
|
||||
);
|
||||
if (!oldGuild) return;
|
||||
|
||||
@@ -40,7 +40,8 @@ export async function handleGuildUpdate(
|
||||
if (!cachedValue && !value) return;
|
||||
|
||||
if (Array.isArray(cachedValue) && Array.isArray(value)) {
|
||||
const different = cachedValue.length !== value.length ||
|
||||
const different =
|
||||
cachedValue.length !== value.length ||
|
||||
cachedValue.find((val) => !value.includes(val)) ||
|
||||
value.find((val) => !cachedValue.includes(val));
|
||||
if (!different) return;
|
||||
|
||||
Reference in New Issue
Block a user