forked from Supositware/Haha-Yes
delete nolight.png
This commit is contained in:
parent
489db4279e
commit
8f31ca0880
1 changed files with 4 additions and 2 deletions
|
@ -55,7 +55,7 @@ class nolightCommand extends Command {
|
||||||
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
|
ctx.drawImage(bg, 0, 0, canvas.width, canvas.height);
|
||||||
ctx.font = applyText(canvas, text);
|
ctx.font = applyText(canvas, text);
|
||||||
ctx.fillStyle = '#FFFFFF';
|
ctx.fillStyle = '#FFFFFF';
|
||||||
ctx.fillText(text, canvas.width / 10, canvas.height / 9.8);
|
ctx.fillText(text, canvas.width / 10, canvas.height / 9);
|
||||||
|
|
||||||
fs.writeFile('./img/frame001.png', canvas.toBuffer(), function (err) {
|
fs.writeFile('./img/frame001.png', canvas.toBuffer(), function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
|
@ -64,13 +64,15 @@ class nolightCommand extends Command {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function apng() {
|
async function apng() {
|
||||||
|
fs.unlink('./img/nolight.png', (err) => {
|
||||||
|
if (err) throw err;
|
||||||
|
});
|
||||||
const { stdout, stderr } = await exec('apngasm -o img/nolight.png img/frame00*.png -s')
|
const { stdout, stderr } = await exec('apngasm -o img/nolight.png img/frame00*.png -s')
|
||||||
.then(() => message.channel.send({files: ['./img/nolight.png']}));
|
.then(() => message.channel.send({files: ['./img/nolight.png']}));
|
||||||
console.log(`stdout: ${stdout}`);
|
console.log(`stdout: ${stdout}`);
|
||||||
console.log(`stderr: ${stderr}`);
|
console.log(`stderr: ${stderr}`);
|
||||||
}
|
}
|
||||||
apng();
|
apng();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue