Compare commits
1 changed files with 2 additions and 5 deletions
|
|
@ -9,12 +9,9 @@ module.exports = {
|
|||
return;
|
||||
}
|
||||
let replacedLink = "";
|
||||
const regex = /(?<=\/)(x|twitter)\.com/g
|
||||
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);
|
||||
|
|
@ -24,7 +21,7 @@ module.exports = {
|
|||
try{
|
||||
message.delete()
|
||||
}catch(err){
|
||||
console.error(`${this.name}: An error occurred while trying to delete the original message.`)
|
||||
console.error(`${this.name}: An error happened while trying to delete the original message.`)
|
||||
console.error(err);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue