From 337efe965c5ef41fa75884559c6f2dfe8596e58b Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 11 Jul 2020 01:33:27 +0200 Subject: [PATCH] Use attachments --- commands/utility/gif2vid.js | 7 +++++++ commands/utility/vid2gif.js | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/commands/utility/gif2vid.js b/commands/utility/gif2vid.js index 47f0155b..69787b36 100644 --- a/commands/utility/gif2vid.js +++ b/commands/utility/gif2vid.js @@ -26,7 +26,14 @@ class gif2vidCommand extends Command { } async exec(message, args) { + + + let Attachment = (message.attachments).array(); let vid = args.vid; + // Get attachment link + if (Attachment[0] && !args.vid) { + vid = Attachment[0].url; + } let loadingmsg = await message.channel.send('Processing '); diff --git a/commands/utility/vid2gif.js b/commands/utility/vid2gif.js index c85a753e..04fb36e4 100644 --- a/commands/utility/vid2gif.js +++ b/commands/utility/vid2gif.js @@ -35,7 +35,12 @@ class vid2gifCommand extends Command { } async exec(message, args) { + let Attachment = (message.attachments).array(); let vid = args.vid; + // Get attachment link + if (Attachment[0] && !args.vid) { + vid = Attachment[0].url; + } let loadingmsg = await message.channel.send('Processing ');