Make to-be-continued look better

This commit is contained in:
Dragon Fire
2018-08-07 09:27:42 -04:00
parent 5c08d91faf
commit aee84cf145
2 changed files with 3 additions and 8 deletions
+2 -7
View File
@@ -2,7 +2,7 @@ const Command = require('../../structures/Command');
const { createCanvas, loadImage } = require('canvas');
const request = require('node-superfetch');
const path = require('path');
const { sepia } = require('../../util/Canvas');
const { drawImageWithTint } = require('../../util/Canvas');
module.exports = class ToBeContinuedCommand extends Command {
constructor(client) {
@@ -34,12 +34,7 @@ module.exports = class ToBeContinuedCommand extends Command {
const data = await loadImage(body);
const canvas = createCanvas(data.width, data.height);
const ctx = canvas.getContext('2d');
ctx.drawImage(data, 0, 0);
sepia(ctx, 0, 0, data.width, data.height);
ctx.globalAlpha = 0.5;
ctx.fillStyle = '#704214';
ctx.fillRect(0, 0, data.width, data.height);
ctx.globalAlpha = 1;
drawImageWithTint(ctx, data, '#704214', 0, 0, data.width, data.height);
const ratio = base.width / base.height;
const width = canvas.width / 2;
const height = Math.round(width / ratio);
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "85.12.0",
"version": "85.12.1",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {