Prettified Code!

This commit is contained in:
itohatweb
2021-05-21 15:55:49 +00:00
committed by GitHub Action
parent 71a20fb0f4
commit 179add27c9
271 changed files with 889 additions and 3067 deletions
+2 -8
View File
@@ -6,17 +6,11 @@ import { snowflakeToBigint } from "../../util/bigint.ts";
export async function handleGuildMemberRemove(data: DiscordGatewayPayload) {
const payload = data.d as GuildMemberRemove;
const guild = await cacheHandlers.get(
"guilds",
snowflakeToBigint(payload.guildId)
);
const guild = await cacheHandlers.get("guilds", snowflakeToBigint(payload.guildId));
if (!guild) return;
guild.memberCount--;
const member = await cacheHandlers.get(
"members",
snowflakeToBigint(payload.user.id)
);
const member = await cacheHandlers.get("members", snowflakeToBigint(payload.user.id));
eventHandlers.guildMemberRemove?.(guild, payload.user, member);
member?.guilds.delete(guild.id);