Check for link

This commit is contained in:
Loïc Bersier 2020-08-08 21:17:37 +00:00
parent 8097b7ee2f
commit 0cf246d5a2

View file

@ -42,6 +42,8 @@ class cursesCommand extends Command {
else else
link = await attachment(message); link = await attachment(message);
if (!link) return message.channel.send('Please specify the URL of the video you want to curse.');
let ext = path.extname(link.toLowerCase()); let ext = path.extname(link.toLowerCase());
console.log(ext); console.log(ext);
if (ext !== '.webm' && ext !== '.mp4') if (ext !== '.webm' && ext !== '.mp4')