13 lines
453 B
JavaScript
13 lines
453 B
JavaScript
|
const urlCheck = require("../utils/urlcheck.js");
|
||
|
|
||
|
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 require("url-unshort")().expand(args[0]);
|
||
|
return url;
|
||
|
}
|
||
|
};
|
||
|
|
||
|
exports.aliases = ["longurl", "lengthenurl", "longuri", "lengthenuri", "unshorten"];
|