From c4c358dcd96f4ca39e7ffb619d75b7b973028789 Mon Sep 17 00:00:00 2001 From: TheEssem Date: Wed, 30 Dec 2020 11:37:41 -0600 Subject: [PATCH] Fixed pango test escape issues --- commands/caption.js | 2 +- commands/caption2.js | 2 +- commands/sonic.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/caption.js b/commands/caption.js index bc62fa3..68c66e8 100644 --- a/commands/caption.js +++ b/commands/caption.js @@ -9,7 +9,7 @@ exports.run = async (message, args) => { const { buffer, type } = await magick.run({ cmd: "caption", path: image.path, - caption: newArgs.join(" ") + caption: newArgs.join(" ").replace(/&/g, "\\&").replace(/>/g, "\\>").replace(/ { const { buffer, type } = await magick.run({ cmd: "captionTwo", path: image.path, - caption: newArgs.length !== 0 ? newArgs.join(" ") : words.sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * words.length + 1)).join(" ") + caption: newArgs.length !== 0 ? newArgs.join(" ").replace(/&/g, "\\&").replace(/>/g, "\\>").replace(/ 0.5 - Math.random()).slice(0, Math.floor(Math.random() * words.length + 1)).join(" ") }); if (processMessage.channel.messages.get(processMessage.id)) await processMessage.delete(); return { diff --git a/commands/sonic.js b/commands/sonic.js index a2dd085..2551df6 100644 --- a/commands/sonic.js +++ b/commands/sonic.js @@ -5,7 +5,7 @@ exports.run = async (message, args) => { if (args.length === 0) return `${message.author.mention}, you need to provide some text to make a Sonic meme!`; message.channel.sendTyping(); const cleanedMessage = args.join(" ").replace(/&/g, "\\&").replace(/>/g, "\\>").replace(/