From cdab95811c5b159022dee9bc7584a1675e634b55 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 26 Jul 2020 14:04:22 +0200 Subject: [PATCH] delete author message and fix webm flag Signed-off-by: loicbersier --- commands/fun/curses.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/commands/fun/curses.js b/commands/fun/curses.js index 65c16c98..0cf3c856 100644 --- a/commands/fun/curses.js +++ b/commands/fun/curses.js @@ -50,7 +50,7 @@ class cursesCommand extends Command { if (args.webm) ext = '.webm'; let loadingmsg = await message.channel.send('Processing '); - downloader(link, null, `${os.tmpdir()}/${message.id}${ext}`) + downloader(link, [`--format=${ext.replace('.', '')}`], `${os.tmpdir()}/${message.id}${ext}`) .on('error', async err => { loadingmsg.delete(); console.error(err); @@ -76,6 +76,7 @@ class cursesCommand extends Command { } fs.writeFileSync(`${os.tmpdir()}/cursed${message.id}${ext}`, Buffer.from(endResult, 'hex')); + message.delete(); return message.channel.send(`Cursed by ${message.author}`, {files: [`${os.tmpdir()}/cursed${message.id}${ext}`]}) .catch(err => { console.error(err);