Red Panda Command

This commit is contained in:
Dragon Fire
2021-04-18 13:48:00 -04:00
parent ac8b79e79a
commit 84e653111d
2 changed files with 33 additions and 1 deletions
+32
View File
@@ -0,0 +1,32 @@
const Command = require('../../structures/Command');
const request = require('node-superfetch');
module.exports = class RedPandaCommand extends Command {
constructor(client) {
super(client, {
name: 'red-panda',
aliases: ['r-panda'],
group: 'random-img',
memberName: 'red-panda',
description: 'Responds with a random red panda image.',
clientPermissions: ['ATTACH_FILES'],
credit: [
{
name: 'redpanda.pics',
url: 'https://redpanda.pics/',
reason: 'API',
reasonURL: 'https://github.com/NexInfinite/redpandapics'
}
]
});
}
async run(msg) {
try {
const { body } = await request.get('https://redpanda.pics/random');
return msg.say({ files: [body.url] });
} 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": "135.4.0",
"version": "135.5.0",
"description": "Your personal server companion.",
"main": "Xiao.js",
"private": true,