Skip to content

A Discord chatbot built with Python using Google's Gemini API.

Notifications You must be signed in to change notification settings

cattodotpy/GeminiBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GeminiBot

GeminiBot is a Discord bot built with Python using the discord.py library. It is designed to be friendly, informative, and helpful, and can use different emojis to express itself. The bot is equipped with a chat feature using Google's Gemini AI that allows it to interact with users in a friendly and informative manner.

Invite Link 🔗 Support Server 📜

Features

  • Chat: The bot can interact with users in a friendly and informative manner.
  • Session Management: The bot can manage sessions for each user.
  • Environment Preparation: The bot can prepare and visualize its environment.

Installation

  1. Clone this repository:
git clone https://github.com/cattodotpy/GeminiBot.git
  1. Navigate to the project directory:
cd GeminiBot
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Rename the config.example.json file to config.json.
  • Prefix: The prefix used to invoke the bot's commands.
  • Owner: The name of the bot's owner(Will be used for initial prompt).
  • Initial Prompt: The initial prompt used to give context to the bot's responses. If you want to add more varibles to the prompt, you can do so by adding {2} for the second varible, {3} for the third varible, and so on. After adding the varibles, you are required to add the varibles to helpers/session.py line 59.
  1. Rename the .env.example file to .env Fill in your Discord bot token, Gemini API key.

Usage

The bot can be invited to a Discord server and will respond to commands and messages that mention it. It can manage sessions for each user, and can check for unsafe content in messages.

API Reference

The bot uses the Gemini API for generating responses. You can find the API documentation here.

Disclaimers

  • The bot's behavior is subject to the limitations and rules of the Discord API and the Gemini API.
  • The bot's responses are generated by the Gemini API and are not controlled by the developer.

Contributing

Contributions are welcome! Please feel free to submit a pull request.

License

This project is licensed under the terms of the MIT license.

About

A Discord chatbot built with Python using Google's Gemini API.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages