diff --git a/commands/misc/ig.js b/commands/misc/ig.js index af45466..21268b7 100644 --- a/commands/misc/ig.js +++ b/commands/misc/ig.js @@ -12,11 +12,8 @@ module.exports = { const regex = /(?<=\/)(instagram)\.com/g if(args[0].startsWith("https://") || args[0].startsWith("http://")){ replacedLink = args[0].replace(regex, "kkinstagram.com"); - }else { - message.channel.send(noUrlErr); - return; } - if(replacedLink.length === 0){ + if(replacedLink.length === 0 || args[0] === replacedLink){ message.channel.send(noUrlErr); return; } diff --git a/commands/misc/x.js b/commands/misc/x.js index 2a9b515..87b6a26 100644 --- a/commands/misc/x.js +++ b/commands/misc/x.js @@ -12,11 +12,8 @@ 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){ + if(replacedLink.length === 0 || args[0] === replacedLink){ message.channel.send(noUrlErr); return; }