From afef602dc694c778b89f0c7edd7960ff0ab6bd1b Mon Sep 17 00:00:00 2001 From: hchoki <136538030+hchoki@users.noreply.github.com> Date: Mon, 22 Jan 2024 15:36:59 -0500 Subject: [PATCH] Update messageCreate.js --- events/messageCreate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/events/messageCreate.js b/events/messageCreate.js index 118cbe2..e29425d 100644 --- a/events/messageCreate.js +++ b/events/messageCreate.js @@ -12,13 +12,14 @@ module.exports = (client, message) => { const linkRegex = /https?:\/\/(www\.)?(twitter\.com|x\.com)\/[^\s]+/g; const foundLinks = message.content.match(linkRegex); - if (message.embeds.length === 0 && foundLinks) { + if (foundLinks) { let replyText = ''; for (let link of foundLinks) { link = link.replace(/(twitter\.com|x\.com)/, 'vxtwitter.com'); link = link.replace(/\/photo\/\d+$/, ''); replyText += `${link}\n`; } + message.suppressEmbeds(true); message.reply(replyText); }