From 269cff08aa25082d14469284b143425cab05b27f Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 4 Oct 2018 18:59:31 +0200 Subject: [PATCH 1/7] Removed useless entry --- json/react.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/json/react.json b/json/react.json index 98aec4a1..1030e169 100644 --- a/json/react.json +++ b/json/react.json @@ -1,9 +1,5 @@ { - "like if owned": "👍", "fortnite": "🤦", "perhaps": "492350777034014720", - "press f to pay respect": "493014525788946443", - "jeff": "496028845967802378", - "my nama jeff": "496028845967802378", - "my name jeff": "496028845967802378" + "press f to pay respect": "493014525788946443" } \ No newline at end of file From bd88c2419a80a577e6123f859c54b5095f1ee919 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Thu, 4 Oct 2018 18:59:37 +0200 Subject: [PATCH 2/7] Auto react if includes --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index b13f7d07..3faa6089 100644 --- a/index.js +++ b/index.js @@ -82,7 +82,11 @@ client.registry // auto respond to messages else if(responseObject[message_content]) { message.channel.send(responseObject[message_content]); - } + } else if (message_content.includes("like if")) { + message.react("\u{1F44D}") + } else if (message_content.includes("jeff")) { + message.react("496028845967802378") + } }}); client.on('error', console.error); From 72b8425ea4cfcf2431e68e7ad5b295694a8be292 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Fri, 5 Oct 2018 11:37:05 +0200 Subject: [PATCH 3/7] fixed emotesay --- commands/fun/emotesay.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/fun/emotesay.js b/commands/fun/emotesay.js index efaf54da..b93ed93d 100644 --- a/commands/fun/emotesay.js +++ b/commands/fun/emotesay.js @@ -19,10 +19,9 @@ module.exports = class emoteSayCommand extends Command { async run(message, { text }) { message.delete(); - text.toLowerCase().split('') let emojiArray = []; for (let i = 0; i < text.length; i++) - emojiArray[i] = emojiCharacters[text[i]]; + emojiArray[i] = emojiCharacters[text.toLowerCase().split('')[i]]; message.say(emojiArray.join("")) From 6a406084664a89fbc9b066b9856672c353498388 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 6 Oct 2018 12:32:19 +0200 Subject: [PATCH 4/7] Despacito --- json/despacito.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/json/despacito.json b/json/despacito.json index c5ee24fd..fef22f5c 100644 --- a/json/despacito.json +++ b/json/despacito.json @@ -5,5 +5,6 @@ "4": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289088/image-26.png", "5": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289089/image-301.jpg", "6": "https://cdn.discordapp.com/attachments/475999813587173406/498088709883953162/458da9a.jpg", - "7": "https://cdn.discordapp.com/attachments/349122704995254275/498086713026150400/despacito-eS6Lm.jpg" + "7": "https://cdn.discordapp.com/attachments/349122704995254275/498086713026150400/despacito-eS6Lm.jpg", + "8": "https://cdn.discordapp.com/attachments/240843640375607296/498096605661102090/38026328_1287563578041482_711316145507926016_n.png" } \ No newline at end of file From fd579ae39ebc30d224984d27cdb9f8cae0f5e7f1 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sat, 6 Oct 2018 13:24:14 +0200 Subject: [PATCH 5/7] Despacito --- commands/fun/despacito.js | 8 ++++---- json/despacito.json | 9 +++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 json/despacito.json diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index 20c55c83..a8f9bfa9 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -1,4 +1,5 @@ const { Command } = require('discord.js-commando'); +const responseObject = require("../../json/despacito.json"); module.exports = class DespacitoCommand extends Command { constructor(client) { super(client, { @@ -10,9 +11,8 @@ module.exports = class DespacitoCommand extends Command { } async run(message) { - message.say("DES\nPA\nCITO"); - message.channel.send({files: ["https://images-eu.ssl-images-amazon.com/images/I/619fzjO1rmL._SS500.jpg"]}); - message.channel.send({files: ["https://cdn.dopl3r.com/memes_files/despacito-eS6Lm.jpg"]}); - message.say("https://www.youtube.com/watch?v=kJQP7kiw5Fk"); + const number = Object.keys(responseObject).length; + const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; + message.channel.send({files: [responseObject[despacitoNumber]]}); } }; \ No newline at end of file diff --git a/json/despacito.json b/json/despacito.json new file mode 100644 index 00000000..c5ee24fd --- /dev/null +++ b/json/despacito.json @@ -0,0 +1,9 @@ +{ + "1": "https://cdn.discordapp.com/attachments/475999813587173406/498088708210425866/image-50.jpg", + "2": "https://cdn.discordapp.com/attachments/475999813587173406/498088708872994818/image-29.png", + "3": "https://cdn.discordapp.com/attachments/475999813587173406/498088708872994821/magik-2.png", + "4": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289088/image-26.png", + "5": "https://cdn.discordapp.com/attachments/475999813587173406/498088709443289089/image-301.jpg", + "6": "https://cdn.discordapp.com/attachments/475999813587173406/498088709883953162/458da9a.jpg", + "7": "https://cdn.discordapp.com/attachments/349122704995254275/498086713026150400/despacito-eS6Lm.jpg" +} \ No newline at end of file From 065cdd5ea84384f31764f3566eb337de2e1964e7 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 7 Oct 2018 10:05:26 +0200 Subject: [PATCH 6/7] You have been despacitoad --- commands/fun/despacito.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index a8f9bfa9..47ec033f 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -7,12 +7,23 @@ module.exports = class DespacitoCommand extends Command { group: 'fun', memberName: 'despacito', description: `despacito`, + args: [ + { + key: 'user', + prompt: 'What do you want me to say', + type: 'member', + default: '' + } + ] }); } - async run(message) { + async run(message, { user }) { + if (!user) { const number = Object.keys(responseObject).length; const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send({files: [responseObject[despacitoNumber]]}); - } + } else + message.say(`${user}, you have been despacitoad`) + } }; \ No newline at end of file From 6a5808babc002fd508f38294ba4a703b75e3acb9 Mon Sep 17 00:00:00 2001 From: loicbersier Date: Sun, 7 Oct 2018 23:02:05 +0200 Subject: [PATCH 7/7] Despacito --- commands/fun/despacito.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/fun/despacito.js b/commands/fun/despacito.js index 47ec033f..b41d08bb 100644 --- a/commands/fun/despacito.js +++ b/commands/fun/despacito.js @@ -23,7 +23,9 @@ module.exports = class DespacitoCommand extends Command { const number = Object.keys(responseObject).length; const despacitoNumber = Math.floor (Math.random() * (number - 1 + 1)) + 1; message.channel.send({files: [responseObject[despacitoNumber]]}); - } else - message.say(`${user}, you have been despacitoad`) + } else if (user.id === message.author.id) { + message.say(`Did you just try to despacitoad yourself?`) + } else + message.say(`${user}, you have been despacitoad`) } }; \ No newline at end of file