Fixed pango test escape issues
This commit is contained in:
parent
5e170c8fe7
commit
c4c358dcd9
3 changed files with 3 additions and 3 deletions
|
@ -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(/</g, "\\<").replace(/"/g, "\\"").replace(/'/g, "\\'")
|
||||
});
|
||||
if (processMessage.channel.messages.get(processMessage.id)) await processMessage.delete();
|
||||
return {
|
||||
|
|
|
@ -9,7 +9,7 @@ exports.run = async (message, args) => {
|
|||
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(/</g, "\\<").replace(/"/g, "\\"").replace(/'/g, "\\'") : words.sort(() => 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 {
|
||||
|
|
|
@ -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(/</g, "\\<").replace(/"/g, "\\"").replace(/'/g, "\\'");
|
||||
const { buffer, type } = await magick.run({
|
||||
const { buffer } = await magick.run({
|
||||
cmd: "sonic",
|
||||
text: wrap(cleanedMessage, {width: 15, indent: ""})
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue