From 5041644a5c4b18b93d42f339ee95d0cb5faa6b68 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 26 Jul 2017 00:30:06 +0000 Subject: [PATCH] Chuck Norris Jokes --- commands/random-res/chuck-norris.js | 33 +++++++++++++++++++++++++++++ html/carbonfeat.html | 2 +- html/discordbots.html | 2 +- package.json | 2 +- 4 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 commands/random-res/chuck-norris.js diff --git a/commands/random-res/chuck-norris.js b/commands/random-res/chuck-norris.js new file mode 100644 index 00000000..051fc9cf --- /dev/null +++ b/commands/random-res/chuck-norris.js @@ -0,0 +1,33 @@ +const Command = require('../../structures/Command'); +const snekfetch = require('snekfetch'); + +module.exports = class ChuckNorrisCommand extends Command { + constructor(client) { + super(client, { + name: 'chuck-norris', + aliases: ['chuck', 'norris'], + group: 'random-res', + memberName: 'chuck-norris', + description: 'Responds with a Chuck Norris quote.', + args: [ + { + key: 'name', + prompt: 'What would you like the name to be?', + type: 'string', + default: 'Chuck' + } + ] + }); + } + + async run(msg, args) { + const { name } = args; + const { body } = await snekfetch + .get('http://api.icndb.com/jokes/random') + .query({ + escape: 'javascript', + firstName: name + }); + return msg.say(body.value.joke); + } +}; diff --git a/html/carbonfeat.html b/html/carbonfeat.html index 3a3978c7..69f28788 100644 --- a/html/carbonfeat.html +++ b/html/carbonfeat.html @@ -32,7 +32,7 @@
  • Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
  • 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
  • Waifu and Ship Rating!
  • -
  • Random Compliments, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
  • +
  • Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
  • Roleplay Commands!
  • Search Various sites including:
    1. diff --git a/html/discordbots.html b/html/discordbots.html index 5adc1bef..e5f6fe79 100644 --- a/html/discordbots.html +++ b/html/discordbots.html @@ -29,7 +29,7 @@
    2. Random Cats, Dogs, VOCALOID Songs, and Xiao Pai Images!
    3. 8 Ball, Choose, Coin Flip, Magic Conch, Roll, and Member Roulette!
    4. Waifu and Ship Rating!
    5. -
    6. Random Compliments, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
    7. +
    8. Random Compliments, Chuck Norris Jokes, Quotes, Fact Core Quotes, Fortunes, Names, and Roasts!
    9. Roleplay Commands!
    10. Search Various sites including:
      1. diff --git a/package.json b/package.json index 25dc5d84..20df9a10 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiaobot", - "version": "27.7.1", + "version": "27.8.1", "description": "Your personal server companion.", "main": "Shard.js", "scripts": {