From ddacfdb3f4b844f4fe046486885d1f974ef4f5eb Mon Sep 17 00:00:00 2001 From: ITOH Date: Fri, 21 May 2021 18:41:42 +0200 Subject: [PATCH] Update guild.ts --- src/structures/guild.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/structures/guild.ts b/src/structures/guild.ts index da3d0fdff..210ceaff6 100644 --- a/src/structures/guild.ts +++ b/src/structures/guild.ts @@ -186,7 +186,7 @@ export async function createDiscordenoGuild(data: Guild, shardId: number) { threads = [], presences = [], joinedAt = "", - emojis, + emojis = [], members = [], icon, splash, @@ -252,9 +252,7 @@ export async function createDiscordenoGuild(data: Guild, shardId: number) { joinedAt: createNewProp(Date.parse(joinedAt)), presences: createNewProp(new Collection(presences.map((p) => [snowflakeToBigint(p.user!.id), p]))), memberCount: createNewProp(memberCount), - emojis: createNewProp( - new Collection((emojis || []).map((emoji) => [emoji.id ? snowflakeToBigint(emoji.id) : emoji.name, emoji])) - ), + emojis: createNewProp(new Collection(emojis.map((emoji) => [snowflakeToBigint(emoji.id!), emoji]))), voiceStates: createNewProp(new Collection(voiceStateStructs.map((vs) => [vs.userId, vs]))), bitfield: createNewProp(bitfield), });