diff --git a/README.md b/README.md index 422ec6a1..0e0dc310 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ Xiao is a Discord bot coded in JavaScript with The bot is no longer available for invite. You can self-host the bot, or use her on the [home server](https://discord.gg/sbMe32W). -## Commands (299) +## Commands (300) ### Utility: * **eval**: Executes JavaScript code. @@ -60,6 +60,7 @@ on the [home server](https://discord.gg/sbMe32W). * **fidget**: Responds with a random image of Fidget. * **fortune**: Responds with a random fortune. * **fox**: Responds with a random fox image. +* **github-zen**: Responds with a random GitHub design philosophy. * **joke**: Responds with a random joke. * **kiss-marry-kill**: Determines who to kiss, who to marry, and who to kill. * **magic-conch**: Asks your question to the Magic Conch. diff --git a/commands/random/github-zen.js b/commands/random/github-zen.js new file mode 100644 index 00000000..124e3783 --- /dev/null +++ b/commands/random/github-zen.js @@ -0,0 +1,23 @@ +const Command = require('../../structures/Command'); +const request = require('node-superfetch'); + +module.exports = class GithubZenCommand extends Command { + constructor(client) { + super(client, { + name: 'github-zen', + aliases: ['gh-zen'], + group: 'random', + memberName: 'github-zen', + description: 'Responds with a random GitHub design philosophy.' + }); + } + + async run(msg) { + try { + const { text } = await request.get('https://api.github.com/zen'); + return msg.say(text); + } catch (err) { + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + } + } +}; diff --git a/commands/search/github.js b/commands/search/github.js index bf40b3fd..90dfb5c4 100644 --- a/commands/search/github.js +++ b/commands/search/github.js @@ -8,7 +8,7 @@ module.exports = class GithubCommand extends Command { constructor(client) { super(client, { name: 'github', - aliases: ['github-repository', 'github-repo', 'git-repo'], + aliases: ['github-repository', 'github-repo', 'git-repo', 'gh'], group: 'search', memberName: 'github', description: 'Responds with information on a GitHub repository.', diff --git a/package.json b/package.json index 8be20228..07e303bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "88.1.2", + "version": "88.2.0", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {