This project is a Discord chatbot with Python, powered by Google Gemini via google.genai library. It responds to mentions, supports image and PDF attachments, and includes a slash command for bug reports. The bot is built for server assistance and automation while keeping configuration simple through environment variables and a system prompt file.
Tip
Any LLM model is possible and might have additional changes. In this case, I prefer to use Gemini on this one.
- Mention the bot in a channel or reply to one of its messages.
- Example:
@Winter What is the weather today? - If the bot is replied to, it will include prior conversation context.
/bug_report— opens a modal that lets users report bugs directly to developers.- The command has a 60-second cooldown per user.
- Clone this repository
Copy this command into your terminal
git clone https://github.com/DevEooo/Discord-Chatbot.git
- Install prerequisite dependencies
To run this app, we need to install some libraries such as:
discord.py,google.genai(or any LLM models you preferred) andpython-dotenv.pip install discord.py google.genai python-dotenv
- Setup your .env and prompt.txt files Create .env in project's root containing discord and LLM credential (more on .env_example) and prompt.txt in root as well. You could customize your own chatbot prompt creatively, or modify the chatbot template that I've written in prompt_example.txt!
- All set!
Your discord chatbot is ready to use! Run this app file by inserting this command:
python main.py

