This commit is contained in:
Dragon Fire
2020-06-29 20:20:48 -04:00
parent c8156470e9
commit 6a3bcdb58c
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -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).
+2 -2
View File
@@ -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!`);
}