1
0
Fork 0

Send error message when link dosent work

akairo
Loïc Bersier 5 years ago
parent 2a857938af
commit 29a4b7bb73

@ -34,6 +34,10 @@ class memeCommand extends Command {
let Attachment = (message.attachments).array();
if (args.ImageURL) {
fetch(args.ImageURL)
.catch(err => {
console.error(err);
return message.channel.send('An error has occured, is your link valid?');
})
.then(res => {
const dest = fs.createWriteStream('./img/memeInput.gif');
res.body.pipe(dest);

Loading…
Cancel
Save