2021-06-28 22:59:05 +00:00
|
|
|
const Command = require("../../classes/command.js");
|
|
|
|
const imageDetect = require("../../utils/imagedetect.js");
|
|
|
|
|
2021-07-04 03:05:00 +00:00
|
|
|
class RawCommand extends Command {
|
2021-06-28 22:59:05 +00:00
|
|
|
async run() {
|
|
|
|
this.message.channel.sendTyping();
|
|
|
|
const image = await imageDetect(this.client, this.message);
|
2021-07-04 03:05:00 +00:00
|
|
|
if (image === undefined) return "You need to provide an image to get a raw URL!";
|
2021-06-28 22:59:05 +00:00
|
|
|
return image.path;
|
|
|
|
}
|
|
|
|
|
2021-07-04 03:05:00 +00:00
|
|
|
static description = "Gets a direct image URL (useful for saving GIFs from sites like Tenor)";
|
|
|
|
static aliases = ["gif", "getgif", "giflink", "imglink", "getimg", "rawgif", "rawimg"];
|
2021-06-28 22:59:05 +00:00
|
|
|
}
|
|
|
|
|
2021-07-04 03:05:00 +00:00
|
|
|
module.exports = RawCommand;
|