if its webm, swf or pdf send it as link

This commit is contained in:
Loïc Bersier 2019-06-26 04:39:41 +02:00
parent b0fefd0203
commit 78e1457b11

View file

@ -53,7 +53,7 @@ class FourchanCommand extends Command {
.setFooter(`${boards.getName(args.board)} | ${response.threads[i].posts[0].now}`) .setFooter(`${boards.getName(args.board)} | ${response.threads[i].posts[0].now}`)
.setTimestamp(); .setTimestamp();
if (response.threads[i].posts[0].ext == '.webm') { if (response.threads[i].posts[0].ext == '.webm' || response.threads[i].posts[0].ext == '.pdf' || response.threads[i].posts[0].ext == '.swf') {
message.channel.send(FourchanEmbed); message.channel.send(FourchanEmbed);
message.channel.send(`https://i.4cdn.org/${args.board}/${response.threads[i].posts[0].tim}${response.threads[i].posts[0].ext}`); message.channel.send(`https://i.4cdn.org/${args.board}/${response.threads[i].posts[0].tim}${response.threads[i].posts[0].ext}`);