mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-19 13:56:43 +02:00
A bit less transparent
This commit is contained in:
@@ -37,7 +37,7 @@ module.exports = class VietnamFlashbacksCommand extends Command {
|
|||||||
const ratio = base.width / base.height;
|
const ratio = base.width / base.height;
|
||||||
const width = Math.round(data.height * ratio);
|
const width = Math.round(data.height * ratio);
|
||||||
ctx.drawImage(base, (data.width / 2) - (width / 2), 0, width, data.height);
|
ctx.drawImage(base, (data.width / 2) - (width / 2), 0, width, data.height);
|
||||||
ctx.globalAlpha = 0.5;
|
ctx.globalAlpha = 0.75;
|
||||||
ctx.drawImage(data, 0, 0);
|
ctx.drawImage(data, 0, 0);
|
||||||
const attachment = canvas.toBuffer();
|
const attachment = canvas.toBuffer();
|
||||||
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
if (Buffer.byteLength(attachment) > 8e+6) return msg.reply('Resulting image was above 8 MB.');
|
||||||
|
|||||||
Reference in New Issue
Block a user