From 4a57d208fa9ea05b1fcdebed605f60d83fe09ff1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= <loic@loics-macbook-pro.home>
Date: Sun, 18 Nov 2018 18:04:13 +0100
Subject: [PATCH] Renamed youtube to download

---
 commands/utility/{youtube.js => download.js} | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
 rename commands/utility/{youtube.js => download.js} (88%)

diff --git a/commands/utility/youtube.js b/commands/utility/download.js
similarity index 88%
rename from commands/utility/youtube.js
rename to commands/utility/download.js
index c8c13bce..ba316df1 100644
--- a/commands/utility/youtube.js
+++ b/commands/utility/download.js
@@ -4,12 +4,12 @@ const youtubedl = require('youtube-dl');
 const blacklist = require('../../json/blacklist.json');
 const { fbuser, fbpasswd } = require('../../config.json');
 
-module.exports = class youtubeCommand extends Command {
+module.exports = class downloadCommand extends Command {
     constructor(client) {
         super(client, {
-            name: 'youtube',
+            name: 'download',
             group: 'utility',
-            memberName: 'youtube',
+            memberName: 'download',
             description: `Download any video from the link you provided.`,
             args: [
                 {
@@ -30,6 +30,8 @@ module.exports = class youtubeCommand extends Command {
             let video = youtubedl(link, [`--username=${fbuser}`,`--password=${fbpasswd}`])
             video.pipe(fs.createWriteStream('video.mp4'))
             video.on('end', function() {
+            message.delete();
+            message.delete();
             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'))
             })