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.
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.
-
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 selectingList
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
- Using the Breed ID
-
Statistics
- Using the Breed ID
acur
to fetch statistics about the American Curl provides us with the following information
- Using the Breed ID
-
List
- Running this command with the
List
argument shows us a list of 4 letter codes we can use with the bot.
- Running this command with the
-
-
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.