From 355b671aa58fb36c02063936b73ba32d694a80a7 Mon Sep 17 00:00:00 2001 From: Navy Date: Tue, 22 Jun 2021 23:59:12 +0300 Subject: [PATCH] bugfix --- structure/ChannelHandler.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/structure/ChannelHandler.js b/structure/ChannelHandler.js index eb23f26..3f19513 100644 --- a/structure/ChannelHandler.js +++ b/structure/ChannelHandler.js @@ -166,7 +166,8 @@ class ChannelHandler { // eslint-disable-next-line camelcase icon_url: user.displayAvatarURL({ dynamic: true }) }, - description: entry.content, + // 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: mem?.highestRoleColor || 0, fields: [], timestamp: new Date(entry.timestamp)