const magick = require("../utils/image.js"); exports.run = async (message, args) => { message.channel.sendTyping(); const image = await require("../utils/imagedetect.js")(message); if (image === undefined) return `${message.author.mention}, you need to provide an image to generate a meme!`; const newArgs = args.filter(item => !item.includes(image.url) ); if (args.length === 0) return `${message.author.mention}, you need to provide some text to generate a meme!`; const [topText, bottomText] = newArgs.join(" ").split(/(? elem.trim()); const buffer = await magick({ cmd: "meme", path: image.path, top: topText.toUpperCase().replace(/&/g, "\\&").replace(/>/g, "\\>").replace(//g, "\\>").replace(/