diff --git a/commands/random-img/kemonomimi.js b/commands/random-img/kemonomimi.js new file mode 100644 index 00000000..0a791dec --- /dev/null +++ b/commands/random-img/kemonomimi.js @@ -0,0 +1,32 @@ +const Command = require('../../structures/Command'); +const request = require('node-superfetch'); + +module.exports = class KemonomimiCommand extends Command { + constructor(client) { + super(client, { + name: 'kemonomimi', + aliases: ['cat-girl', 'nekomusume', '猫娘', '獣耳'], + group: 'random-img', + memberName: 'kemonomimi', + description: 'Responds with a random kemonomimi image.', + clientPermissions: ['ATTACH_FILES'], + credit: [ + { + name: 'noticeme.moe', + url: 'https://noticeme.moe/', + reason: 'API', + reasonURL: 'https://noticeme.moe/kemonomimi.php' + } + ] + }); + } + + async run(msg) { + try { + const { body } = await request.get('https://noticeme.moe/kemonomimi.php'); + return msg.say({ files: [body] }); + } catch (err) { + return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); + } + } +}; diff --git a/package.json b/package.json index 50ca8418..97ca5003 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "134.9.0", + "version": "134.10.0", "description": "Your personal server companion.", "main": "Xiao.js", "private": true,