Random Bird and Shiba

This commit is contained in:
Daniel Odendahl Jr
2018-09-26 23:39:40 +00:00
parent 8aaca6d46f
commit d4be43bfd7
4 changed files with 58 additions and 2 deletions
+3 -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 (318)
## Commands (320)
### Utility:
* **eval:** Executes JavaScript code.
@@ -44,6 +44,7 @@ on the [home server](https://discord.gg/sbMe32W).
* **8-ball:** Asks your question to the Magic 8 Ball.
* **advice-slip:** Responds with a random bit of advice.
* **bird:** Responds with a random bird image.
* **cat-fact:** Responds with a random cat fact.
* **cat:** Responds with a random cat image.
* **charlie-charlie-challenge:** Asks your question to Charlie.
@@ -80,6 +81,7 @@ on the [home server](https://discord.gg/sbMe32W).
* **roast:** Roasts a user.
* **roll:** Rolls a dice with a maximum value of your choice.
* **security-key:** Responds with a random security key.
* **shiba:** Responds with a random image of a Shiba Inu.
* **shower-thought:** Responds with a random shower thought, directly from r/Showerthoughts.
* **suggest-command:** Suggests a random command for you to try.
* **superpower:** Responds with a random superpower.
+24
View File
@@ -0,0 +1,24 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class BirdCommand extends Command {
constructor(client) {
super(client, {
name: 'bird',
aliases: ['birb'],
group: 'random',
memberName: 'bird',
description: 'Responds with a random bird image.',
clientPermissions: ['ATTACH_FILES']
});
}
async run(msg) {
try {
const { body } = await request.get('http://random.birb.pw/tweet.json/');
return msg.say({ files: [`http://random.birb.pw/img/${body.file}`] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+30
View File
@@ -0,0 +1,30 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class ShibaCommand extends Command {
constructor(client) {
super(client, {
name: 'shiba',
aliases: ['shiba-inu', 'shibe', 'shibe-inu', 'doge'],
group: 'random',
memberName: 'shiba',
description: 'Responds with a random image of a Shiba Inu.',
clientPermissions: ['ATTACH_FILES']
});
}
async run(msg) {
try {
const { body } = await request
.get('https://shibe.online/api/shibes')
.query({
count: 1,
urls: true,
httpsUrls: true
});
return msg.say({ files: [body[0]] });
} catch (err) {
return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`);
}
}
};
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "xiao",
"version": "91.12.4",
"version": "91.13.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {