From e7f1d491cd8f86f9bc14c49b19a66d165c74bf28 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 26 Jul 2020 13:59:25 +0200 Subject: [PATCH] webm override Signed-off-by: loicbersier --- commands/fun/curses.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/commands/fun/curses.js b/commands/fun/curses.js index c36f5752..65c16c98 100644 --- a/commands/fun/curses.js +++ b/commands/fun/curses.js @@ -17,6 +17,11 @@ class cursesCommand extends Command { id: 'link', type: 'url', }, + { + id: 'webm', + match: 'flag', + flag: ['--webm'] + }, ], description: { content: 'Mess with video length. webm = expanding length and mp4 = very long length', @@ -38,9 +43,11 @@ class cursesCommand extends Command { link = await attachment(message); let ext = path.extname(link.toLowerCase()); - if (ext !== '.webm' || ext !== '.mp4') { + if (ext !== '.webm' || ext !== '.mp4') ext = '.mp4'; - } + + + if (args.webm) ext = '.webm'; let loadingmsg = await message.channel.send('Processing '); downloader(link, null, `${os.tmpdir()}/${message.id}${ext}`)