Use attachments

This commit is contained in:
loicbersier 2020-07-11 01:33:27 +02:00
parent dcf299bcf2
commit 337efe965c
2 changed files with 12 additions and 0 deletions

View file

@ -26,7 +26,14 @@ class gif2vidCommand extends Command {
} }
async exec(message, args) { async exec(message, args) {
let Attachment = (message.attachments).array();
let vid = args.vid; let vid = args.vid;
// Get attachment link
if (Attachment[0] && !args.vid) {
vid = Attachment[0].url;
}
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>'); let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');

View file

@ -35,7 +35,12 @@ class vid2gifCommand extends Command {
} }
async exec(message, args) { async exec(message, args) {
let Attachment = (message.attachments).array();
let vid = args.vid; let vid = args.vid;
// Get attachment link
if (Attachment[0] && !args.vid) {
vid = Attachment[0].url;
}
let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>'); let loadingmsg = await message.channel.send('Processing <a:loadingmin:527579785212329984>');