Skip to content

paintingofblue/thecatapi-discord-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Cat API Discord bot

Discord bot written in Python to utilize TheCatAPI to fetch GIFs, images, and information about various breeds. I also utilize Reddit's public subreddit endpoint to scrape videos. Unfortunately, links from that endpoint are without sound, and the current method I use to host the bot doesn't have enough resources to add sound using FFmpeg.

Installation

This bot requires an API key from TheCatAPI, as well as a Discord token.

After you have gotten the API key from TheCatAPI, open utils.py and put the API key into the array named keyList.

Next, set the Discord token to the token variable.

You can then run main.py to launch the bot.

Commands

  • Gif

    • This command allows you to fetch a random cat gif.
  • Image

    • This command allows you to fetch a random cat image. It takes an optional argument for the Breed ID, which can show you images of a specific breed.
    • You can fetch a list of Breed IDs that work with the bot by running /breeds and selecting List from the dropdown.
  • Fact

    • This command fetches a random fact about cats. I used my own collection of cat facts for this command.
  • Video

    • This command fetches a random video from a list of subreddits. It shows the information about the post, such as the title, who posted it, the subreddit it was posted in and the video itself.
  • Breeds

    • This command has 2 different arguments. It can be used to show a description of your chosen breed, to show statistics about your breed, as well as list all supported breeds by the bot.

    • Information

      • Using the Breed ID acur to fetch information about the American Curl provides us with the following information
    • Statistics

      • Using the Breed ID acur to fetch statistics about the American Curl provides us with the following information
    • List

      • Running this command with the List argument shows us a list of 4 letter codes we can use with the bot.
  • Schedule

    • This command allows you to add a Discord webhook to the hourly cat photo schedule I've created. It features 3 arguments, which allow you to either add a webhook, remove it, or view the current webhook added to the schedule.
  • Help

    • This command basically sends a short version of this.

About

Discord bot written in Python to send random cat gifs, videos & images

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages