From 771290e76c54acad394f9c1d7287f7e931d8b49b Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 26 Mar 2024 00:52:29 +0200 Subject: [PATCH] bugfix --- src/ChannelHandler.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ChannelHandler.ts b/src/ChannelHandler.ts index 0b170b4..374036a 100644 --- a/src/ChannelHandler.ts +++ b/src/ChannelHandler.ts @@ -247,7 +247,7 @@ class ChannelHandler if (!user) return reject(new Error('Failed to find user')); const mem = await this.modmail.getMember(user.id).catch(this.logger.error.bind(this.logger)); - const mbr = mem?.struct as GuildMember; + const mbr = mem?.struct; // eslint-disable-next-line @typescript-eslint/no-shadow const embed: APIEmbed = { @@ -262,7 +262,7 @@ class ChannelHandler }, // eslint-disable-next-line no-nested-ternary description: entry.content && entry.content.length ? entry.content.length > 2000 ? `${entry.content.substring(0, 2000)}...\n\n**Content cut off**` : entry.content : '**__MISSING CONTENT__**', - color: mbr.roles.highest.color || 0, + color: mbr?.roles.highest.color || 0, fields: [], timestamp: new Date(entry.timestamp).toISOString() };