2021-08-19 14:19:14 +00:00
|
|
|
import Command from "../../classes/command.js";
|
|
|
|
import imageDetect from "../../utils/imagedetect.js";
|
2021-06-28 22:59:05 +00:00
|
|
|
|
2021-07-04 03:05:00 +00:00
|
|
|
class RawCommand extends Command {
|
2021-06-28 22:59:05 +00:00
|
|
|
async run() {
|
2021-08-14 02:34:44 +00:00
|
|
|
this.client.sendChannelTyping(this.message.channel.id);
|
2021-06-28 22:59:05 +00:00
|
|
|
const image = await imageDetect(this.client, this.message);
|
2022-01-26 18:53:20 +00:00
|
|
|
if (image === undefined) return "You need to provide an image/GIF 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
|
|
|
}
|
|
|
|
|
2022-01-26 18:53:20 +00:00
|
|
|
export default RawCommand;
|