mrmBot-Matrix/commands/general/raw.js

17 lines
613 B
JavaScript
Raw Normal View History

import Command from "../../classes/command.js";
import imageDetect from "../../utils/imagedetect.js";
class RawCommand extends Command {
async run() {
2021-08-14 02:34:44 +00:00
this.client.sendChannelTyping(this.message.channel.id);
const image = await imageDetect(this.client, this.message);
if (image === undefined) return "You need to provide an image/GIF to get a raw URL!";
return image.path;
}
static description = "Gets a direct image URL (useful for saving GIFs from sites like Tenor)";
static aliases = ["gif", "getgif", "giflink", "imglink", "getimg", "rawgif", "rawimg"];
}
export default RawCommand;