From 5d405e4bd2762da4f3bc5ce06e71c84a832ba9f2 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Sun, 3 Sep 2017 03:44:59 +0000 Subject: [PATCH] Random GIFs --- XiaoBot.js | 2 +- commands/roleplay/break-up.js | 36 +++++++++++++++++++++++++++++++ commands/roleplay/cuddle.js | 9 +++++++- commands/roleplay/divorce.js | 28 ------------------------ commands/roleplay/eat.js | 9 +++++++- commands/roleplay/evolve.js | 9 +++++++- commands/roleplay/falcon-punch.js | 9 +++++++- commands/roleplay/fist-bump.js | 9 +++++++- commands/roleplay/high-five.js | 9 +++++++- commands/roleplay/hug.js | 9 +++++++- commands/roleplay/inhale.js | 9 +++++++- commands/roleplay/kiss.js | 9 +++++++- commands/roleplay/marry.js | 8 ++++++- commands/roleplay/pat.js | 9 +++++++- commands/roleplay/poke.js | 9 +++++++- commands/roleplay/punch.js | 9 +++++++- commands/roleplay/slap.js | 9 +++++++- package.json | 4 ++-- 18 files changed, 150 insertions(+), 45 deletions(-) create mode 100644 commands/roleplay/break-up.js delete mode 100644 commands/roleplay/divorce.js diff --git a/XiaoBot.js b/XiaoBot.js index db3f5253..45c85f59 100644 --- a/XiaoBot.js +++ b/XiaoBot.js @@ -41,7 +41,7 @@ client.registry client.on('ready', () => { console.log(`[READY] Shard ${client.shard.id} logged in as ${client.user.tag} (${client.user.id})!`); - client.user.setActivity(`${COMMAND_PREFIX}help | Shard ${client.shard.id}`); + client.user.setActivity(`${COMMAND_PREFIX}help | Shard ${client.shard.id}`, { type: 0 }); }); client.on('disconnect', event => { diff --git a/commands/roleplay/break-up.js b/commands/roleplay/break-up.js new file mode 100644 index 00000000..0184192e --- /dev/null +++ b/commands/roleplay/break-up.js @@ -0,0 +1,36 @@ +const Command = require('../../structures/Command'); +const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/IgvLWaa.gif', + 'https://i.imgur.com/ExSXiIP.gif', + 'https://i.imgur.com/z35hyC8.gif', + 'https://i.imgur.com/i9VAxiV.gif', + 'https://i.imgur.com/dvDwVom.gif' +]; + +module.exports = class BreakUpCommand extends Command { + constructor(client) { + super(client, { + name: 'break-up', + aliases: ['divorce'], + group: 'roleplay', + memberName: 'break-up', + description: 'Breaks up with a user.', + args: [ + { + key: 'user', + prompt: 'What user do you want to roleplay with?', + type: 'user' + } + ] + }); + } + + run(msg, args) { + const { user } = args; + return msg.say(stripIndents` + **${msg.author.username}** *breaks up with* **${user.username}** + ${gifs[Math.floor(Math.random() * gifs.length)]} + `); + } +}; diff --git a/commands/roleplay/cuddle.js b/commands/roleplay/cuddle.js index 8f7941d9..3d337ac1 100644 --- a/commands/roleplay/cuddle.js +++ b/commands/roleplay/cuddle.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/mpi3pwu.gif', + 'https://i.imgur.com/0yAIWbg.gif', + 'https://i.imgur.com/xQPBSIs.gif', + 'https://i.imgur.com/O4K8Bj4.gif', + 'https://i.imgur.com/eBWR5vJ.gif' +]; module.exports = class CuddleCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class CuddleCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *cuddles* **${user.username}** - https://i.imgur.com/0yAIWbg.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/divorce.js b/commands/roleplay/divorce.js deleted file mode 100644 index 2e2fc7ec..00000000 --- a/commands/roleplay/divorce.js +++ /dev/null @@ -1,28 +0,0 @@ -const Command = require('../../structures/Command'); -const { stripIndents } = require('common-tags'); - -module.exports = class DivorceCommand extends Command { - constructor(client) { - super(client, { - name: 'divorce', - group: 'roleplay', - memberName: 'divorce', - description: 'Divorces a user.', - args: [ - { - key: 'user', - prompt: 'What user do you want to roleplay with?', - type: 'user' - } - ] - }); - } - - run(msg, args) { - const { user } = args; - return msg.say(stripIndents` - **${msg.author.username}** *divorces* **${user.username}** - https://i.imgur.com/IgvLWaa.gif - `); - } -}; diff --git a/commands/roleplay/eat.js b/commands/roleplay/eat.js index 49d8f3f0..3d81b3cb 100644 --- a/commands/roleplay/eat.js +++ b/commands/roleplay/eat.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/O7FQ5kz.gif', + 'https://i.imgur.com/LuWHflH.gif', + 'https://i.imgur.com/t87M9T9.gif', + 'https://i.imgur.com/W5qKOiU.gif', + 'https://i.imgur.com/vFQvAMk.gif' +]; module.exports = class EatCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class EatCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *eats* **${user.username}** - https://i.imgur.com/O7FQ5kz.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/evolve.js b/commands/roleplay/evolve.js index 44c68532..dfd27c1e 100644 --- a/commands/roleplay/evolve.js +++ b/commands/roleplay/evolve.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/gkdDk4P.gif', + 'https://i.imgur.com/BjFCGGx.gif', + 'https://i.imgur.com/XJkJ9UR.gif', + 'https://i.imgur.com/H2XpKr6.gif', + 'https://i.imgur.com/McM6VYZ.gif' +]; module.exports = class EvolveCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class EvolveCommand extends Command { const { user } = args; return msg.say(stripIndents` **${user.username}** *is evolving!* - https://i.imgur.com/gkdDk4P.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/falcon-punch.js b/commands/roleplay/falcon-punch.js index 94c9645a..db45d663 100644 --- a/commands/roleplay/falcon-punch.js +++ b/commands/roleplay/falcon-punch.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/LOuK637.gif', + 'https://i.imgur.com/7nG6pDW.gif', + 'https://i.imgur.com/yxxSoFV.gif', + 'https://i.imgur.com/gC31YyP.gif', + 'https://i.imgur.com/RT0Qk0V.gif' +]; module.exports = class FalconPunchCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class FalconPunchCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *falcon punches* **${user.username}** - https://i.imgur.com/LOuK637.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/fist-bump.js b/commands/roleplay/fist-bump.js index f13b0743..8b243ec2 100644 --- a/commands/roleplay/fist-bump.js +++ b/commands/roleplay/fist-bump.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/lO2xZHC.gif', + 'https://i.imgur.com/xKwxZZi.gif', + 'https://i.imgur.com/dFv5VkI.gif', + 'https://i.imgur.com/mIzwBt3.gif', + 'https://i.imgur.com/3Os9psM.gif' +]; module.exports = class FistBumpCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class FistBumpCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *fist-bumps* **${user.username}** - *badalalala* https://i.imgur.com/lO2xZHC.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/high-five.js b/commands/roleplay/high-five.js index 6a6ac634..dd8e1b04 100644 --- a/commands/roleplay/high-five.js +++ b/commands/roleplay/high-five.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://media.giphy.com/media/x58AS8I9DBRgA/giphy.gif', + 'https://i.imgur.com/W4cEKMy.gif', + 'https://i.imgur.com/r67Klvg.gif', + 'https://i.imgur.com/zi7D5X2.gif', + 'https://i.imgur.com/rJJWFj8.gif' +]; module.exports = class HighFivesCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class HighFivesCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *high-fives* **${user.username}** - https://media.giphy.com/media/x58AS8I9DBRgA/giphy.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/hug.js b/commands/roleplay/hug.js index 22fefe7e..9089e143 100644 --- a/commands/roleplay/hug.js +++ b/commands/roleplay/hug.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/q9Wkhz4.gif', + 'https://i.imgur.com/dUejMIs.gif', + 'https://i.imgur.com/NsTtb7j.gif', + 'https://i.imgur.com/p4CZKph.gif', + 'https://i.imgur.com/1L9TaPV.gif' +]; module.exports = class HugCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class HugCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *hugs* **${user.username}** - https://i.imgur.com/q9Wkhz4.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/inhale.js b/commands/roleplay/inhale.js index 7045e328..ca0937a0 100644 --- a/commands/roleplay/inhale.js +++ b/commands/roleplay/inhale.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/b4NeOXj.gif', + 'https://i.imgur.com/PnNkvCL.gif', + 'https://i.imgur.com/f6fojcB.gif', + 'https://i.imgur.com/JSoSkMV.gif', + 'https://i.imgur.com/TIEIBHW.gif' +]; module.exports = class InhaleCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class InhaleCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *inhales* **${user.username}** *but gained no ability...* - https://i.imgur.com/b4NeOXj.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/kiss.js b/commands/roleplay/kiss.js index af4df812..439db040 100644 --- a/commands/roleplay/kiss.js +++ b/commands/roleplay/kiss.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/S7mwPfE.gif', + 'https://i.imgur.com/ElvU78j.gif', + 'https://i.imgur.com/zW0GEA7.gif', + 'https://i.imgur.com/kbM8dzE.gif', + 'https://i.imgur.com/tQiFXDq.gif' +]; module.exports = class KissCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class KissCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *kisses* **${user.username}** - https://i.imgur.com/S7mwPfE.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/marry.js b/commands/roleplay/marry.js index f0292100..99a1e263 100644 --- a/commands/roleplay/marry.js +++ b/commands/roleplay/marry.js @@ -1,5 +1,11 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/u67QLhB.gif', + 'https://i.imgur.com/k8r28dR.gif', + 'https://i.imgur.com/pqXqmSB.gif', + 'https://i.imgur.com/gOb9sTR.gif' +]; module.exports = class MarryCommand extends Command { constructor(client) { @@ -22,7 +28,7 @@ module.exports = class MarryCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *marries* **${user.username}** - https://i.imgur.com/u67QLhB.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/pat.js b/commands/roleplay/pat.js index 6dcd58f1..7a175081 100644 --- a/commands/roleplay/pat.js +++ b/commands/roleplay/pat.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/oynHZmT.gif', + 'https://i.imgur.com/qcZiv4W.gif', + 'https://i.imgur.com/aAvI3Cq.gif', + 'https://i.imgur.com/DJ6iTRW.gif', + 'https://i.imgur.com/whDGqSu.gif' +]; module.exports = class PatCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class PatCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *pats* **${user.username}** - https://i.imgur.com/oynHZmT.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/poke.js b/commands/roleplay/poke.js index fe51c67a..c551a2f7 100644 --- a/commands/roleplay/poke.js +++ b/commands/roleplay/poke.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/XMuJ7K8.gif', + 'https://i.imgur.com/mewvEFw.gif', + 'https://i.imgur.com/RKGafME.gif', + 'https://i.imgur.com/pqgsmX1.gif', + 'https://i.imgur.com/Ez67xSU.gif' +]; module.exports = class PokeCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class PokeCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *pokes* **${user.username}** - https://i.imgur.com/XMuJ7K8.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/punch.js b/commands/roleplay/punch.js index 87d82953..901158d6 100644 --- a/commands/roleplay/punch.js +++ b/commands/roleplay/punch.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/WKj10Dc.gif', + 'https://i.imgur.com/pOIxkab.gif', + 'https://i.imgur.com/XvNOY3B.gif', + 'https://i.imgur.com/ai4cne0.gif', + 'https://i.imgur.com/Tg8tGny.gif' +]; module.exports = class PunchCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class PunchCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *punches* **${user.username}** - https://i.imgur.com/WKj10Dc.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/commands/roleplay/slap.js b/commands/roleplay/slap.js index cc186fd3..648f3f4d 100644 --- a/commands/roleplay/slap.js +++ b/commands/roleplay/slap.js @@ -1,5 +1,12 @@ const Command = require('../../structures/Command'); const { stripIndents } = require('common-tags'); +const gifs = [ + 'https://i.imgur.com/rfy8z2K.gif', + 'https://i.imgur.com/FsygXIT.gif', + 'https://i.imgur.com/8sbR33w.gif', + 'https://i.imgur.com/wsIpwcT.gif', + 'https://i.imgur.com/mAV8aa7.gif' +]; module.exports = class SlapCommand extends Command { constructor(client) { @@ -22,7 +29,7 @@ module.exports = class SlapCommand extends Command { const { user } = args; return msg.say(stripIndents` **${msg.author.username}** *slaps* **${user.username}** - https://i.imgur.com/rfy8z2K.gif + ${gifs[Math.floor(Math.random() * gifs.length)]} `); } }; diff --git a/package.json b/package.json index ea2bc0d6..725c2bef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "35.1.2", + "version": "35.1.3", "description": "Your personal server companion.", "main": "Shard.js", "scripts": { @@ -35,7 +35,7 @@ "common-tags": "^1.4.0", "custom-translate": "github:dragonfire535/custom-translate", "discord.js": "github:hydrabolt/discord.js", - "discord.js-commando": "github:dragonfire535/discord.js-commando#test", + "discord.js-commando": "github:gawdl3y/discord.js-commando", "erlpack": "github:hammerandchisel/erlpack", "node-opus": "^0.2.6", "snekfetch": "^3.2.9",