mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
27 lines
620 B
JavaScript
27 lines
620 B
JavaScript
const Command = require('../../framework/Command');
|
|
const request = require('node-superfetch');
|
|
|
|
module.exports = class GithubZenCommand extends Command {
|
|
constructor(client) {
|
|
super(client, {
|
|
name: 'github-zen',
|
|
aliases: ['gh-zen'],
|
|
group: 'random-res',
|
|
description: 'Responds with a random GitHub design philosophy.',
|
|
credit: [
|
|
{
|
|
name: 'GitHub',
|
|
url: 'https://github.com/',
|
|
reason: 'Zen API',
|
|
reasonURL: 'https://developer.github.com/v3/'
|
|
}
|
|
]
|
|
});
|
|
}
|
|
|
|
async run(msg) {
|
|
const { text } = await request.get('https://api.github.com/zen');
|
|
return msg.say(text);
|
|
}
|
|
};
|