From 3363f39a0d2d990d37ac90fdc57d5b06e3a0eb4c Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sun, 28 Apr 2024 17:43:37 -0400 Subject: [PATCH] Make square avatars rounded --- commands/edit-image-text/tweet.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/edit-image-text/tweet.js b/commands/edit-image-text/tweet.js index 1c68a675..15e7dac1 100644 --- a/commands/edit-image-text/tweet.js +++ b/commands/edit-image-text/tweet.js @@ -197,6 +197,9 @@ module.exports = class TweetCommand extends Command { ctx.arc(17 + 26, 84 + 26, 26, 0, Math.PI * 2); ctx.closePath(); ctx.clip(); + } else { + this.roundedPath(ctx, 10, 17, 84, 52, 52); + ctx.clip(); } ctx.drawImage(avatar, 17, 84, 52, 52); return msg.say({ files: [{ attachment: canvas.toBuffer(), name: 'tweet.png' }] });