From 5cc8339064002fbae2019778e8149437e169587b Mon Sep 17 00:00:00 2001 From: EarTensifier Date: Sun, 21 Nov 2021 20:06:44 -0800 Subject: [PATCH] Allow tags with more than 100 characters to be displayed in embeds --- commands/tags/tags.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/commands/tags/tags.js b/commands/tags/tags.js index 595479a..00da5b1 100644 --- a/commands/tags/tags.js +++ b/commands/tags/tags.js @@ -74,13 +74,20 @@ class TagsCommand extends Command { } else { const getResult = await database.getTag(this.message.channel.guild.id, this.args[0].toLowerCase()); if (!getResult) return "This tag doesn't exist!"; + if (getResult.content.length > 2000) { + return { + embeds: [{ + "description": getResult.content, + }], + }; + } return getResult.content; } } async setTag(content, name, message, edit = false) { if ((!content || content.length === 0) && message.attachments.length === 0) return "You need to provide the content of the tag!"; - if (content && content.length >= 2000) return "Your tag content is too long!"; + if (content && content.length > 4096) return "Your tag content is too long!"; if (message.attachments.length !== 0 && content) { await database[edit ? "editTag" : "setTag"](name, { content: `${content} ${message.attachments[0].url}`, author: message.author.id }, message.channel.guild); } else if (message.attachments.length !== 0) {