const magick = require("../build/Release/image.node"); const { promisify } = require("util"); exports.run = async (message, args) => { const image = await require("../utils/imagedetect.js")(message); if (image === undefined) return `${message.author.mention}, you need to provide an image/GIF to make a motivational poster!`; const newArgs = args.filter(item => !item.includes(image.url) ); if (args.length === 0) return `${message.author.mention}, you need to provide some text to make a motivational poster!`; const processMessage = await message.channel.createMessage(" Processing... This might take a while"); const [topText, bottomText] = newArgs.join(" ").split(/(? elem.trim()); const buffer = await promisify(magick.motivate)(image.path, topText.replace(/&/g, "\\&").replace(/>/g, "\\>").replace(//g, "\\>").replace(/