From 62fbb445e2867cc2cb1e1799879ce01ecadfb6fa Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 26 Feb 2026 18:30:02 +0100 Subject: [PATCH] Send a message if no X/Twitter links are provided --- commands/misc/x.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/commands/misc/x.js b/commands/misc/x.js index 802cf75..1d35bd4 100644 --- a/commands/misc/x.js +++ b/commands/misc/x.js @@ -3,8 +3,9 @@ module.exports = { name: 'x', description: 'Replaces X/Twitter links with fxtwitter and deletes the original message', execute({message, args}) { - if(args.length < 0) { - message.channel.send("TODO: NO_X_LINK_ERR"); + const noUrlErr = "You need to provide an X or twitter link to use this command." + if(args.length < 1) { + message.channel.send(noUrlErr); return; } let replacedLink = ""; @@ -13,7 +14,7 @@ module.exports = { replacedLink = args[0].replace(regex, "fxtwitter.com"); } if(replacedLink.length === 0){ - message.channel.send("You need to provide an X or twitter link to use this command."); + message.channel.send(noUrlErr); return; } message.channel.send(replacedLink);