diff --git a/commands/random/cat.js b/commands/random/cat.js index 40eb3969..770ac0bd 100644 --- a/commands/random/cat.js +++ b/commands/random/cat.js @@ -1,6 +1,5 @@ const Command = require('../../structures/Command'); const request = require('node-superfetch'); -const { THE_CAT_API_KEY } = process.env; module.exports = class CatCommand extends Command { constructor(client) { @@ -16,11 +15,8 @@ module.exports = class CatCommand extends Command { async run(msg) { try { - const { body, headers } = await request - .get('http://thecatapi.com/api/images/get') - .query({ api_key: THE_CAT_API_KEY }); - const format = headers['content-type'].replace(/image\//i, ''); - return msg.say({ files: [{ attachment: body, name: `cat.${format}` }] }); + const { body } = await request.get('https://aws.random.cat/meow'); + return msg.say({ files: [body.file] }); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); } diff --git a/package.json b/package.json index 29a6587b..8d367b85 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "85.12.3", + "version": "85.12.4", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": {