From 1330b499c8b4e1af332cde31ef29e59414440417 Mon Sep 17 00:00:00 2001 From: Keanu Date: Mon, 14 Jun 2021 11:25:11 +0200 Subject: [PATCH] Fix message links for long Nitro messages. --- src/modules/messageEmbed.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/messageEmbed.ts b/src/modules/messageEmbed.ts index 107b28d..e09371b 100644 --- a/src/modules/messageEmbed.ts +++ b/src/modules/messageEmbed.ts @@ -26,6 +26,10 @@ client.on("message", async (message) => { return message.channel.send(new MessageEmbed().setDescription("🚫 The message is empty.")); } + if (linkMessage.cleanContent.length > 2048) { + return message.channel.send(new MessageEmbed().setDescription("🚫 This message is too long.")); + } + const infoEmbed = new MessageEmbed() .setAuthor( linkMessage.author.username,