Skip to content

Commit

Permalink
Merge pull request #30 from uaf-cs/fix/random-cat
Browse files Browse the repository at this point in the history
fix: move to new random cat API
  • Loading branch information
katlyn authored Jan 19, 2024
2 parents 151d473 + 6b27e4a commit 1f26f77
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/commands/fun/images.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import fetch from 'node-fetch'
export const init = (bot: CommandClient): void => {
bot.registerCommand('cat', async msg => {
try {
const req = await fetch('https://aws.random.cat/meow')
const req = await fetch('https://cataas.com/cat?json=true')
if (req.ok) {
const randomKitty = await req.json()
await msg.channel.createMessage({
embed: {
image: {
url: randomKitty.file
url: `https://cataas.com/cat/${randomKitty._id}`
}
}
})
Expand Down

0 comments on commit 1f26f77

Please sign in to comment.