mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-05 08:12:04 +02:00
Github Zen Command
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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!`);
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -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
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "xiao",
|
||||
"version": "88.1.2",
|
||||
"version": "88.2.0",
|
||||
"description": "Your personal server companion.",
|
||||
"main": "Xiao.js",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user