diff --git a/README.md b/README.md index b9bee971..80b64fff 100644 --- a/README.md +++ b/README.md @@ -195,6 +195,7 @@ API. All are free unless otherwise stated. * `OSU_KEY` can be obtained by [signing up at the osu! API page](https://osu.ppy.sh/p/api/). Whether this link takes you to the right page or not is hit-or-miss. * `STACKOVERFLOW_KEY` can be obtained by [registering your app at stackapps](https://stackapps.com/apps/oauth/register). * `TENOR_KEY` can be obtained by [Registering an Application at the Tenor website](https://tenor.com/developer/keyregistration). +* `THECATAPI_KEY` can be obtained at the [TheCatAPI website](https://thecatapi.com/). * `TMDB_KEY` can be obtained by [following these instructions at the TMDB website](https://www.themoviedb.org/documentation/api). Read the "How do I apply for an API key?" section. * `TUMBLR_KEY` can be obtained at the [Tumblr developer portal](https://www.tumblr.com/oauth/apps). * `TWITTER_KEY` and `TWITTER_SECRET` can be obtained at the [Twitter developer portal](https://developer.twitter.com/en/apps). diff --git a/commands/random-img/cat.js b/commands/random-img/cat.js index 2c314a85..2a46e98d 100644 --- a/commands/random-img/cat.js +++ b/commands/random-img/cat.js @@ -25,13 +25,13 @@ module.exports = class CatCommand extends Command { async run(msg) { try { const { body } = await request - .get('https://api.thecatapi.com/images/search') + .get('https://api.thecatapi.com/v1/images/search') .query({ limit: 1, mime_types: 'jpg,png' }) .set({ 'x-api-key': THECATAPI_KEY }); - return msg.say({ files: [body.file] }); + return msg.say({ files: [body.images[0].url] }); } catch (err) { return msg.reply(`Oh no, an error occurred: \`${err.message}\`. Try again later!`); }