BookBot is a simple discord bot that helps you get information about books! It uses the Google Books API to fetch book information based on user queries. The bot is written in python suing the Discord.py
library.
- Add the bot to your server.
- Say hi! Write
/hi
on the server to be greeted by the bot. - Use the
/bookinfo
command to search for books. For example,/bookinfo Harry Potter
will return all titles related to Harry Potter. - Select a book by typing the number corresponding to the book you want to know more about, or enter
-1
to stop the search. - The bot will display the title, author, description, and rating of the selected book.
To install the bot, follow these steps:
- Register a bot application on the Discord Developer Portal.
- Make a bot with the messages intent enabled.
- Copy the bot token.
- Register a project on Google Cloud and add the Google Books API to the project.
- Copy the API key.
- Clone this repository.
- Install requirements by running
pip install -r requirements.txt
- Create a
.env
file in the root directory and add your bot token in the following format:
DISCORD_BOT_TOKEN=<YOUR_BOT_TOKEN>
BOOKS_API_KEY=<YOUR_GOOGLE_BOOKS_API_KEY>
- Run the bot using the command
python bot.py
.