diff --git a/src/commands/fun/quote.js b/src/commands/fun/quote.js index a7a97c8..81d79b5 100644 --- a/src/commands/fun/quote.js +++ b/src/commands/fun/quote.js @@ -22,10 +22,8 @@ module.exports = { const msg = interaction.targetMessage; const user = msg.author; const avatar = `https://cdn.discordapp.com/avatars/${user.id}/${user.avatar}.png?size=1024`; - console.log("Generating quote image"); try { const data = await createQuoteImage(avatar, user.displayName, msg.content, true, interaction.client.users.cache); - console.log("Sending quote image"); await interaction.followUp({ files: [{ diff --git a/src/utils/quoter.js b/src/utils/quoter.js index 5156c50..a41e499 100644 --- a/src/utils/quoter.js +++ b/src/utils/quoter.js @@ -29,6 +29,8 @@ function wrapText(context, text, x, y, maxWidth, lineHeight, preparingSentence, lines.push(preparingSentence.join(" ")); + y -= (lines.length * lineHeight) / 2; + lines.forEach(element => { const lineWidth = context.measureText(element).width; const xOffset = (maxWidth - lineWidth) / 2;