From 9796e9245ae75b40e71d1f5003696c5ce5b9612a Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Fri, 27 Feb 2026 19:24:01 +0100 Subject: [PATCH] Don't send an unchanged link in x command --- commands/misc/x.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/misc/x.js b/commands/misc/x.js index bf8e1c7..2e7283b 100644 --- a/commands/misc/x.js +++ b/commands/misc/x.js @@ -12,6 +12,9 @@ module.exports = { const regex = /(?<=\/)(x|twitter)\.com/g if(args[0].startsWith("https://") || args[0].startsWith("http://")){ replacedLink = args[0].replace(regex, "fxtwitter.com"); + }else { + message.channel.send(noUrlErr); + return; } if(replacedLink.length === 0){ message.channel.send(noUrlErr);