Github Zen Command

This commit is contained in:
Daniel Odendahl Jr
2018-08-30 11:06:16 +00:00
parent 654f58fca1
commit b2a89819ef
4 changed files with 27 additions and 3 deletions
+2 -1
View File
@@ -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.
+23
View File
@@ -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!`);
}
}
};
+1 -1
View File
@@ -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.',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "88.1.2",
"version": "88.2.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {