{"id":21433050,"url":"https://github.com/llegomark/google-gemini-discord-bot","last_synced_at":"2026-03-01T22:04:46.018Z","repository":{"id":231488834,"uuid":"781862701","full_name":"llegomark/google-gemini-discord-bot","owner":"llegomark","description":"This is a Discord bot that integrates with Google Generative AI, specifically the Gemini model, to provide conversational capabilities. Gemini is Google's largest and most capable AI model. The bot can respond to user messages, maintain conversation history, and perform various commands.","archived":false,"fork":false,"pushed_at":"2024-06-18T20:52:17.000Z","size":765,"stargazers_count":5,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-11T12:20:35.410Z","etag":null,"topics":["ai","artificial-intelligence","discord","discord-bot","gemini","gemini-api","gemini-pro","google"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/llegomark.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-04-04T07:22:53.000Z","updated_at":"2025-12-24T00:37:21.000Z","dependencies_parsed_at":"2024-04-04T09:25:26.149Z","dependency_job_id":"7ceb8e3a-6901-4efd-9bd7-eda56d7463fc","html_url":"https://github.com/llegomark/google-gemini-discord-bot","commit_stats":null,"previous_names":["llegomark/google-gemini-discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/llegomark/google-gemini-discord-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llegomark%2Fgoogle-gemini-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llegomark%2Fgoogle-gemini-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llegomark%2Fgoogle-gemini-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llegomark%2Fgoogle-gemini-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/llegomark","download_url":"https://codeload.github.com/llegomark/google-gemini-discord-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/llegomark%2Fgoogle-gemini-discord-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29986242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T21:06:37.093Z","status":"ssl_error","status_checked_at":"2026-03-01T21:05:45.052Z","response_time":124,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","artificial-intelligence","discord","discord-bot","gemini","gemini-api","gemini-pro","google"],"created_at":"2024-11-22T23:24:26.067Z","updated_at":"2026-03-01T22:04:45.999Z","avatar_url":"https://github.com/llegomark.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Bot with Google Generative AI (Gemini) Integration\n\nThis is a Discord bot that integrates with Google Generative AI, specifically the Gemini model, to provide conversational capabilities. Gemini is Google's largest and most capable AI model. The bot can respond to user messages, maintain conversation history, and perform various commands. \n\n## Features\n\n- Responds to user messages using Google Generative AI\n- Maintains conversation history for each user\n- Supports slash commands for user interactions\n- Clears conversation history using the `/clear` command\n- Saves conversation and sends it to the user's inbox using the `/save` command\n- Automatically changes the bot's presence status every 30 seconds\n\n## Screenshots\n\n![Screenshot](screenshots/Screenshot1.png)\n\n![Screenshot](screenshots/Screenshot2.png)\n\n## Gemini Discord Bot Setup Guide\n\nThis guide will walk you through the process of setting up and running the Gemini Discord Bot on your own server. \n\n**Requirements:**\n\n* Node.js and npm (or yarn) installed on your system.\n* A Discord account and a server where you have administrator permissions.\n* A Google account with access to the Generative AI API and a valid API key.\n\n**Steps:**\n\n1. **Clone the Repository:**\n    - Open a terminal or command prompt and navigate to the directory where you want to store the bot's files.\n    - Clone the repository using git:\n    ```bash\n    git clone https://github.com/llegomark/google-gemini-discord-bot.git\n    ```\n    - Navigate to the newly created directory:\n    ```bash\n    cd google-gemini-discord-bot\n    ```\n\n2. **Install Dependencies:**\n    - Install the required dependencies using npm or yarn:\n    ```bash\n    npm install\n    ```\n    or\n    ```bash\n    yarn install\n    ```\n\n3. **Set up Environment Variables:**\n    - Create a file named `.env` in the project's root directory.\n    - Add the following environment variables to the file, replacing the placeholders with your actual values:\n    ```\n    DISCORD_BOT_TOKEN=YOUR_DISCORD_BOT_TOKEN\n    DISCORD_CLIENT_ID=YOUR_DISCORD_CLIENT_ID\n    GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY\n    ```\n    - You can obtain your bot token and client ID from the [Discord Developer Portal](https://discord.com/developers/docs/intro). \n    - The Google API key can be obtained from the [Google AI Studio](https://aistudio.google.com/).\n\n4. **Deploy Slash Commands (Optional):**\n    - This step is only necessary if you want to use slash commands (e.g., `/clear`). \n    - If you don't need slash commands, you can skip this step.\n    - In the terminal, run the following command:\n    ```bash\n    node deploy-commands.js\n    ```\n    - This will register the slash commands with your Discord application.\n\n5. **Start the Bot:**\n    - In the terminal, run the following command to start the bot:\n    ```bash\n    node index.js\n    ```\n    - The bot will connect to Discord and be ready to interact with users.\n\n**Interacting with the Bot:**\n\n* **Direct Messages:** Send a direct message to the bot to start a conversation.\n* **Mentions:** Mention the bot in a server channel to get its attention.\n* **Slash Commands:** Use the `/clear` command to clear the conversation history.\n\n**Additional Notes:**\n\n* You can customize the bot's behavior and responses by modifying the code in the `conversationManager.js` and `config.js` files.\n* The `errorHandler.js` file contains basic error handling logic. You can extend it to implement more robust error handling.\n* Make sure to keep your API keys and bot token secure. Do not share them publicly. \n* Refer to the [Discord.js documentation](https://discord.js.org/docs/packages/discord.js/14.14.1) and the [Google Generative AI documentation](https://ai.google.dev/docs) for more information on the available features and options. \n\n**Enjoy using the Gemini Discord Bot!**\n\nPlease keep in mind that this project is a work in progress, and breaking changes or new features may be introduced in future updates.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllegomark%2Fgoogle-gemini-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fllegomark%2Fgoogle-gemini-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fllegomark%2Fgoogle-gemini-discord-bot/lists"}