Bunny Command

This commit is contained in:
Dragon Fire
2020-06-04 12:27:04 -04:00
parent 8362cada9e
commit 6c4b778834
3 changed files with 38 additions and 2 deletions
+4 -1
View File
@@ -224,7 +224,7 @@ in the appropriate channel's topic to use it.
## Commands
Total: 455
Total: 456
### Utility:
@@ -314,6 +314,7 @@ Total: 455
### Random Image:
* **bird:** Responds with a random image of a bird.
* **bunny:** Responds with a random image of a bunny.
* **cat:** Responds with a random cat image.
* **dog:** Responds with a random dog image.
* **duck:** Responds with a random duck image.
@@ -843,6 +844,8 @@ here.
* bulbapedia ([API](https://bulbapedia.bulbagarden.net/w/api.php))
- [Bulletin of the Atomic Scientists](https://thebulletin.org/)
* doomsday-clock ([Doomsday Clock Data](https://thebulletin.org/doomsday-clock/current-time/))
- [bunnies.io](https://www.bunnies.io/)
* bunny (API)
- [calzoneman](https://github.com/calzoneman)
* dec-talk ([API](https://github.com/calzoneman/aeiou))
- [Capcom](http://www.capcom.com/us/)
+33
View File
@@ -0,0 +1,33 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class BunnyCommand extends Command {
constructor(client) {
super(client, {
name: 'bunny',
aliases: ['bun', 'rabbit'],
group: 'random-img',
memberName: 'bunny',
description: 'Responds with a random image of a bunny.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'bunnies.io',
url: 'https://www.bunnies.io/',
reason: 'API'
}
]
});
}
async run(msg) {
try {
const { body } = await request
.get('https://api.bunnies.io/v2/loop/random/')
.query({ media: 'gif,png' });
return msg.say({ files: [body.media.gif || body.media.poster] });
} 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": "116.0.0",
"version": "116.1.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"scripts": {