|
|
@ -31,7 +31,7 @@ module.exports = class downloadCommand extends Command {
|
|
|
|
video.pipe(fs.createWriteStream('video.mp4'))
|
|
|
|
video.pipe(fs.createWriteStream('video.mp4'))
|
|
|
|
video.on('end', function() {
|
|
|
|
video.on('end', function() {
|
|
|
|
message.channel.bulkDelete(2);
|
|
|
|
message.channel.bulkDelete(2);
|
|
|
|
|
|
|
|
message.say(`Download by ${message.author.username}`)
|
|
|
|
message.channel.send({files: ["./video.mp4"]})
|
|
|
|
message.channel.send({files: ["./video.mp4"]})
|
|
|
|
.catch(error => message.say('An error has occured, the file might be too big or i cant download the link you provided'))
|
|
|
|
.catch(error => message.say('An error has occured, the file might be too big or i cant download the link you provided'))
|
|
|
|
})
|
|
|
|
})
|
|
|
|