From fd7bead5aa5c7cedd9604a93d0c50fc8c7501cdd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Bersier?= <loic@loics-macbook-pro.home>
Date: Tue, 13 Nov 2018 15:20:03 +0100
Subject: [PATCH] Can now mention user too

---
 commands/images/fetish.js       | 23 ++++++++++++++++++-----
 commands/images/god.js          | 21 ++++++++++++++++-----
 commands/images/human.js        | 20 +++++++++++++++-----
 commands/images/idubbbz.js      | 22 +++++++++++++++-------
 commands/images/idubbbzpaint.js | 18 +++++++++++++-----
 commands/images/like.js         | 20 +++++++++++++++-----
 commands/images/ugly.js         | 20 +++++++++++++++-----
 7 files changed, 107 insertions(+), 37 deletions(-)

diff --git a/commands/images/fetish.js b/commands/images/fetish.js
index 20267b4d..28186fe0 100644
--- a/commands/images/fetish.js
+++ b/commands/images/fetish.js
@@ -13,18 +13,31 @@ module.exports = class fetishCommand extends Command {
             group: 'images',
             memberName: 'fetish',
             description: `My fetish`,
+            args: [
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
+                }
+            ]
         });
     }
 
-    async run(message) {
+    async run(message, { user }) {
+//  Check if user is blacklisted
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
+
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+        
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url
 
diff --git a/commands/images/god.js b/commands/images/god.js
index 1b92dfbc..9f72237e 100644
--- a/commands/images/god.js
+++ b/commands/images/god.js
@@ -13,18 +13,29 @@ module.exports = class godCommand extends Command {
             group: 'images',
             memberName: 'god',
             description: `Retweet if you aren't afraid to have a picture of god on your timeline`,
+            args: [
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
+                }
+            ]
         });
     }
 
-    async run(message) {
+    async run(message, { user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url
 
diff --git a/commands/images/human.js b/commands/images/human.js
index 579cdb5f..f2b649e0 100644
--- a/commands/images/human.js
+++ b/commands/images/human.js
@@ -13,18 +13,28 @@ module.exports = class humanCommand extends Command {
             group: 'images',
             memberName: 'human',
             description: `HUMAN ?! YOU DARE CALL THAT THING HUMAN?!?!`,
+            args: [
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
+                }
+            ]
         });
     }
 
-    async run(message) {
+    async run(message, { user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url
         
diff --git a/commands/images/idubbbz.js b/commands/images/idubbbz.js
index 6e56874b..df51e089 100644
--- a/commands/images/idubbbz.js
+++ b/commands/images/idubbbz.js
@@ -20,22 +20,30 @@ module.exports = class idubbbzCommand extends Command {
                     prompt: 'What do you the paper to say?',
                     type: 'string',
                     default: 'Nigger Faggot'
+                },
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
                 }
             ]
         });
     }
 
-    async run(message, { text }) {
+    async run(message, { text, user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-        image = message.author.displayAvatarURL
-    else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-        return message.say('Gif dosent work, sorry')
-    else 
-    image = Attachment[0].url
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
+        else 
+        image = Attachment[0].url
 
             const canvas = createCanvas(1281, 627)
             const applyText = (canvas, text) => {
diff --git a/commands/images/idubbbzpaint.js b/commands/images/idubbbzpaint.js
index a1d4cb85..3936b79c 100644
--- a/commands/images/idubbbzpaint.js
+++ b/commands/images/idubbbzpaint.js
@@ -20,20 +20,28 @@ module.exports = class idubbbzpaintCommand extends Command {
                     prompt: 'What do you the paper to say?',
                     type: 'string',
                     default: 'Perfection'
+                },
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
                 }
             ]
         });
     }
 
-    async run(message, { text }) {
+    async run(message, { text, user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url
 
diff --git a/commands/images/like.js b/commands/images/like.js
index b73f923b..14ba1900 100644
--- a/commands/images/like.js
+++ b/commands/images/like.js
@@ -13,18 +13,28 @@ module.exports = class likeCommand extends Command {
             group: 'images',
             memberName: 'like',
             description: `What the hell is this and why did my grandsone like it`,
+            args: [
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
+                }
+            ]
         });
     }
 
-    async run(message) {
+    async run(message, { user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url
 
diff --git a/commands/images/ugly.js b/commands/images/ugly.js
index 0bbf8669..4a32a5cd 100644
--- a/commands/images/ugly.js
+++ b/commands/images/ugly.js
@@ -13,18 +13,28 @@ module.exports = class uglyCommand extends Command {
             group: 'images',
             memberName: 'ugly',
             description: `You are very ugly!`,
+            args: [
+                {
+                    key: 'user',
+                    prompt: 'What do you want me to say',
+                    type: 'user',
+                    default: ''
+                }
+            ]
         });
     }
 
-    async run(message) {
+    async run(message, { user }) {
         if(blacklist[message.author.id])
         return message.channel.send("You are blacklisted")
         let Attachment = (message.attachments).array();
         let image = null
-        if (!Attachment[0])
-            image = message.author.displayAvatarURL
-        else if(Attachment[0] && Attachment[0].url.endsWith('gif'))
-            return message.say('Gif dosent work, sorry')
+        if (!Attachment[0] && !user)
+            image = message.author.displayAvatarURL;
+        else if (!Attachment[0])
+            image = user.displayAvatarURL;
+        else if(Attachment[0].url.endsWith('gif'))
+            return message.say('Gif dosent work, sorry');
         else 
         image = Attachment[0].url