forked from Supositware/Haha-Yes
check for nolight.png
This commit is contained in:
parent
1a85c3251f
commit
ce09c7ce09
1 changed files with 5 additions and 3 deletions
|
@ -49,9 +49,11 @@ class nolightCommand extends Command {
|
||||||
});
|
});
|
||||||
|
|
||||||
async function apng() {
|
async function apng() {
|
||||||
fs.unlink('./img/nolight.png', (err) => {
|
if (fs.readFileSync('./img/nolight.png')) {
|
||||||
if (err) throw err;
|
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}`);
|
||||||
|
|
Loading…
Reference in a new issue