Fixed issue with lengthen, added new activity messages
This commit is contained in:
parent
70c4ff298f
commit
b8527067d9
3 changed files with 6 additions and 3 deletions
|
@ -5,8 +5,10 @@ exports.run = async (message, args) => {
|
|||
message.channel.sendTyping();
|
||||
if (args.length === 0 || !urlCheck(args[0])) return `${message.author.mention}, you need to provide a short URL to lengthen!`;
|
||||
if (urlCheck(args[0])) {
|
||||
const url = await fetch(args[0], { redirect: "manual" });
|
||||
const url = await fetch(encodeURI(args[0]), { redirect: "manual" });
|
||||
return url.headers.get("location") || args[0];
|
||||
} else {
|
||||
return `${message.author.mention}, that isn't a URL!`;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue