Don't send an unchanged link in x command

This commit is contained in:
SileNce5k 2026-02-27 19:24:01 +01:00
commit 9796e9245a
Signed by: SileNce
GPG key ID: B0A142BB4291B204

View file

@ -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);