Make square avatars rounded

This commit is contained in:
Dragon Fire
2024-04-28 17:43:37 -04:00
parent a746a58492
commit 3363f39a0d
+3
View File
@@ -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' }] });