{"id":24647297,"url":"https://github.com/fusefairy/discordbot-geminiai","last_synced_at":"2025-10-07T05:32:03.382Z","repository":{"id":221005157,"uuid":"753015474","full_name":"FuseFairy/DiscordBot-GeminiAI","owner":"FuseFairy","description":"Use Gemini on Discord, with highly customizable features. Using Thread to Create Personal Conversations with AI.","archived":false,"fork":false,"pushed_at":"2024-08-06T07:38:41.000Z","size":112707,"stargazers_count":10,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-06T09:39:52.158Z","etag":null,"topics":["bard","chatbot","discord","discord-bot","discord-py","gemini","gemini-api","gemini-pro","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FuseFairy.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}},"created_at":"2024-02-05T09:56:38.000Z","updated_at":"2024-08-06T07:38:45.000Z","dependencies_parsed_at":"2024-03-06T21:52:27.586Z","dependency_job_id":"92d3fe4c-e59b-4740-8719-da6fbebdec19","html_url":"https://github.com/FuseFairy/DiscordBot-GeminiAI","commit_stats":null,"previous_names":["fusefairy/discordbot-googlegpt"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuseFairy%2FDiscordBot-GeminiAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuseFairy%2FDiscordBot-GeminiAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuseFairy%2FDiscordBot-GeminiAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FuseFairy%2FDiscordBot-GeminiAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FuseFairy","download_url":"https://codeload.github.com/FuseFairy/DiscordBot-GeminiAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235595059,"owners_count":19015426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["bard","chatbot","discord","discord-bot","discord-py","gemini","gemini-api","gemini-pro","python"],"created_at":"2025-01-25T15:21:41.110Z","updated_at":"2025-10-07T05:31:58.009Z","avatar_url":"https://github.com/FuseFairy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DiscordBot-GeminiAI\n  \u003ca href=\"https://www.python.org/downloads/\"\u003e\n    \u003cimg alt=\"PyPI - Python Version\" src=\"https://img.shields.io/badge/pyversion-3.10%2B-blue?style=flat\u0026label=python\"\u003e\n  \u003c/a\u003e\n\n[![Try with Replit Badge](https://replit.com/badge?caption=Try%20with%20Replit)](https://replit.com/@dd8611706/DiscordBot-GeminiAI?v=1#README.md)\n\n### Gemini Demo\n![demo1](https://i.imgur.com/OO52TfC.gif)\n\n### Bard (Gemini web) Demo\n![demo2](https://i.imgur.com/1U5kBJ0.png)\n\n## Update\n\u003e ### 2024/6/11：Gemini 1.5 Pro and Gemini 1.5 Flash can use [system instructions](https://ai.google.dev/gemini-api/docs/system-instructions).\n\u003e ### 2024/4/28：Support [Bard](https://gemini.google.com).\n\u003e ### 2023/2/16：Add Gemini 1.0 Pro model.\n   \n## Features\n\u003cdetails\u003e\n   \u003csummary\u003e\n   \n   ### Slash command\n\n   \u003c/summary\u003e\n   \n* `/api_key setting-gemini [choice] [api_key]`\n  * Can upload own google api key or delete it. (api key get from https://makersuite.google.com/app/apikey)\n    * [choice]：`delete` or `set` personal api key.\n  \n* `/gemini conversation [model] [type] [use_prompt] [use_character]`\n  * Create a thread exclusively for the user to chat with the bot.\n    * [model]：Choose AI model.\n    * [type]：Choose thread type, private or public.\n    * [[system_instructions](https://ai.google.dev/gemini-api/docs/system-instructions)]：Only Gemini 1.5 Pro and Gemini 1.5 Flash can use it.\n    * [temperature]：Controls the level of randomness in the output, ranging from highly varied (closer to 1.0) to less surprising (closer to 0.0).\n    * [harrassment], [hate_speech], [sexually_explicit], [dangerous_content]：It's [Safety Settings](https://ai.google.dev/docs/safety_setting_gemini#safety-settings), the default is `Block some`.\n\n* `/cookies setting-bard [choice] [secure_1psid] [secure_1psidts]`\n  * Can upload own Bard Cookies or delete it.\n    * [choice]：`delete` or `set` personal Bard Cookies.\n    * [secure_1psid], [secure_1psidts]：Required Cookie Parameters.\n\n* `/Bard conversation [type]`\n  * Create a Bard thread exclusively for the user to chat with the bot.\n    * [type]：Choose thread type, private or public.\n\n\u003c/details\u003e\n\n## Usage\n\n### Install\n\n```\npip install -r requirements.txt\n```\n\n### Get Bard Cookies\n\n\u003e [!WARNING]\n\u003e It may not be stable.\n\n\u003e [!IMPORTANT]  \n\u003e Since too many people using the same cookies may cause errors, it is recommended to ask the person who wants to use it to upload his/her own cookies.\n\n* Go to https://gemini.google.com and login with your Google account\n* Press F12 for web inspector, go to `Network` tab and refresh the page\n* Click any request and copy cookie values of `__Secure-1PSID` and `__Secure-1PSIDTS`\n\n### .env setting\nRename the file`.env.dev`to`.env`, then open it and edit it.\n```markdown\nDISCORD_BOT_TOKEN=\n\n# Can get from https://makersuite.google.com/app/apikey\nGEMINI_API_KEY=\n\n# Setting default Bard cookies\nBARD_SECURE_1PSID=\nBARD_SECURE_1PSIDTS=\n\n# Allow each commands only use in some channel, if you don't set it, just default to all channels.\n# specific channel(s) for `/api_key setting-gemini`\nGEMINI_SETTING_CHANNEL_ID=1227670969702754857,1227327094070254857\n\n# specific channel(s) for `/gemini conversation`\nGEMINI_CHAT_CHANNEL_ID=1227327094070254857\n\n# specific channel(s) for `/bard conversation`\nBARD_CHAT_CHANNEL_ID=\n\n# specific channel(s) for `/cookies setting-bard`\nBARD_COOKIES_SETTING_CHANNEL_ID=\n\n# specific channel(s) for `/help`\nHELP_CMD_CHANNEL_ID=\n```\n\n### Start run your bot.\n   ```python\n   python3 bot.py\n\n   ```\n\n## Credits\n* generative-ai-python - https://github.com/google/generative-ai-python\n* Gemini-API - https://github.com/HanaokaYuzu/Gemini-API\n\n## Contributors\n\nThis project exists thanks to all the people who contribute.\n\n[![](https://contrib.rocks/image?repo=FuseFairy/DiscordBot-GeminiAI)](https://github.com/FuseFairy/DiscordBot-GeminiAI/graphs/contributors)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusefairy%2Fdiscordbot-geminiai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusefairy%2Fdiscordbot-geminiai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusefairy%2Fdiscordbot-geminiai/lists"}