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