{"id":18772714,"url":"https://github.com/raremojo/discord-ai","last_synced_at":"2025-08-10T10:22:01.918Z","repository":{"id":183371660,"uuid":"670020056","full_name":"RareMojo/discord-ai","owner":"RareMojo","description":"A LangChain integrated Discord chatbot. Used by GPT Engineer's Discord server.","archived":false,"fork":false,"pushed_at":"2023-10-07T08:40:48.000Z","size":1548,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-13T08:58:17.589Z","etag":null,"topics":["bot","chatbot","discord","documentation","gpt-engineer","langchain","openai"],"latest_commit_sha":null,"homepage":"https://github.com/RareMojo","language":"Python","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/RareMojo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2023-07-24T05:53:28.000Z","updated_at":"2025-02-08T02:27:00.000Z","dependencies_parsed_at":"2023-07-24T07:44:41.911Z","dependency_job_id":"bba11be4-ddb8-4611-b431-1984d7722fff","html_url":"https://github.com/RareMojo/discord-ai","commit_stats":null,"previous_names":["raremojo/gpt-engineer-discordbot","raremojo/discord-ai"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/RareMojo/discord-ai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RareMojo%2Fdiscord-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RareMojo%2Fdiscord-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RareMojo%2Fdiscord-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RareMojo%2Fdiscord-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RareMojo","download_url":"https://codeload.github.com/RareMojo/discord-ai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RareMojo%2Fdiscord-ai/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269709872,"owners_count":24462867,"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","status":"online","status_checked_at":"2025-08-10T02:00:08.965Z","response_time":71,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bot","chatbot","discord","documentation","gpt-engineer","langchain","openai"],"created_at":"2024-11-07T19:29:59.153Z","updated_at":"2025-08-10T10:22:01.882Z","avatar_url":"https://github.com/RareMojo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://discord.gg/g36Mvyd8Gz\"\u003e\n    \u003cimg src=\"https://dcbadge.vercel.app/api/server/g36Mvyd8Gz?style=flat\" alt=\"Discord Follow\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/RareMojo/Discord-AI\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/RareMojo/Discord-AI?style=social\" alt=\"GitHub Repo stars\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://github.com/langchain-ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/LangChain-Integrated-37ff77\" alt=\"LangChain Integration\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow\" alt=\"LICENSE\"\u003e\n  \u003c/a\u003e\n\n  \u003ca href=\"https://discord.gg/8tcDQ89Ej2\"\u003e\n    \u003cimg src=\"https://dcbadge.vercel.app/api/server/8tcDQ89Ej2?style=flat\" alt=\"Discord Follow\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr/\u003e\n\u003cp align=\"center\"\u003e\n  \u003ch2 align=\"center\"\u003eDiscord-AI\u003c/h2\u003e\u003cbr\u003e\n\n  \u003cp align=\"center\"\u003e\n    \u003cimg align=\"center\" width=\"275\" height=\"275\" src=\"https://i.imgur.com/7VclQXi.png\"\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    Your communities personal assistant.\u003cbr\u003e\u003cbr\u003e\n    \u003ca href=\"https://github.com/AntonOsika/gpt-engineer\"\u003e\u003cstrong\u003eCheck out GPT-Engineer! »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr/\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## About Discord-AI\n\nDiscord-AI is a super smart and versatile AI assistant for Discord communities!\n\nIts primary objective is to serve the specific needs of the GPT Engineer Discord community. This version you see here is the open-source adaptation, allowing anyone to benefit from its awesome features!\n\nWhether you need information, want to chat, interact with documents, code, explore websites, or enjoy some cool Discord-only features, Discord-AI has got your back. It's designed to be user-friendly, customizable, and open source – just the way you like it!\n\nWe're all about community here! Join us in making our idea even better. Your thoughts and contributions are always welcome.\n\nLet's level up your Discord experience with Discord-AI, the friendly AI chatbot for everyone! 🤖💬\n\n\u003cbr\u003e\n\n## Prerequisites\n\nBefore you begin, ensure you have met the following requirements:\n\n  - [Python 3.10+](https://www.python.org/downloads/)\n  - **Windows/Linux/MacOS**\n  - [Discord App](https://discordpy.readthedocs.io/en/stable/discord.html)\n\n\u003cbr\u003e\n\n### OpenAI API Key\n\n  1. **Sign up at OpenAI**: Visit the [OpenAI website](https://www.openai.com/) and sign up for an account.\n  2. **Obtain your API key**: Click your profile icon and select \"**View API keys**\" from the dropdown menu. Then, click the \"**Create new secret key**\" button to generate a new API key.\n\n\u003cbr\u003e\n\n### Pinecone DB\n\n  1. **Sign up for Pinecone**: Visit the [Pinecone website](https://www.pinecone.io/) and sign up for an account.\n  2. **Get your Pinecone API key**: After signing up, navigate to your dashboard and obtain your **Pinecone API key, index, and environment**. Watch this [Video Tutorial](https://youtu.be/dnEfQhjZgw0?t=328) for assistance.\n\n\u003cbr\u003e\n\n### MongoDB\n\n  1. **Sign up for Railway**: Visit the [Railway.app website](https://railway.app/) and sign up for an account.\n  2. **Create a new project**: Follow the [official Railway documentation](https://docs.railway.app/getting-started#create-a-project) to create a new project.\n  3. **Add MongoDB plugin**: In your Railway project, add the MongoDB plugin by following the [official Railway documentation](https://docs.railway.app/getting-started).\n  4. **Get your MongoDB URI**: After adding the MongoDB plugin, navigate to the plugin settings and obtain your **MongoDB URI**. Watch this [Video Tutorial](https://www.youtube.com/watch?v=tp0bQNDtLPc\u0026t=88s) for assistance.\n\n\u003cbr\u003e\n\n## Installation\n\nTo install Discord-AI, follow these steps:\n\n\u003cbr\u003e\n\n1. Clone the repository:\n\n    `git clone https://github.com/RareMojo/discord-ai.git`\n\n\u003cbr\u003e\n\n2. Navigate to the project directory:\n\n    `cd discord-ai`\n\n\u003cbr\u003e\n\n3. Run the start script:\n\n    - For Windows:\u003cbr\u003e\n    `start.bat`\n\n    - For Linux/Mac:\u003cbr\u003e\n    `sh start.sh`\n\n\u003cbr\u003e\n\n## Configuration\n\n1. `example_.env` | `.env`:\n\n   - You will need to provide Discord Token and API keys for the bot to function properly.\n   - You also need to provide the Discord server ID, category ID, and threads ID.\n   - The category ID is the ID of the chat category all of your AI chat channels will be in.\n   - The threads ID is the ID of the threads channel that will be used for generic agent interaction.\n\n    \u003cbr\u003e\n\n      Open `example_.env` file in the root directory of the project, and add your keys:\n\n        OPENAI_API_KEY=your-key-here\n        DISCORD_TOKEN=your-token-here\n        DISCORD_GUILD_ID=your-server-id-here\n        CHATBOT_CATEGORY_ID=your-aichat-category-id-here\n        CHATBOT_THREADS_ID=your-aichat-threads-id-here\n        OPENAI_MODEL=gpt-3.5-turbo-16k\n        MONGO_URI=your-mongo-uri-here\n        PINECONE_API_KEY=your-pinecone-api-key-here\n        PINECONE_INDEX=your-pinecone-index-here\n        PINECONE_ENV=your-pinecone-env-here\n\n\n      \n      Rename the file to `.env` if you haven't already and save it.\n\n\u003cbr\u003e\n\n2. `configs\\config.json`:\n\n    - You will be prompted to fill out the required parts of this during setup automatically.\n    - You may directly edit this file to change anything as well.\n    - If you change something that should be updated with the Discord servers, change `update_bot` to true.\n    - You can also edit most of the config values via the bot terminal.\n\n\u003cbr\u003e\n\n3. `configs\\preprompts`:\n\n    - This is a small preprompt that is injected before chat interactions.\n    - It maintains small details such as the bot's name and personality.\n    - You may directly edit this to fit your needs.\n\n\u003cbr\u003e\n\n4. `TMUX (Optional)`:\n\n    - This is used to run the bot like a service in a separate terminal.\n    - You can install it by running `sudo apt install tmux` on Linux.\n    - Feel free to use other methods of running the bot in the background.\n    - [TMUX Tutorial](https://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/)\n\n\u003cbr\u003e\n\n## Usage\n\nAfter installation and configuration, the bot will run automatically.\u003cbr\u003e\nIt uses the GPT model to interact with users in the specified Discord channel.\u003cbr\u003e\nCurrently, it can ingest ReadTheDocs URLs and provide help using it as context.\u003cbr\u003e\n\n\u003cbr\u003e\n\nHere is a step-by-step guide on how to use the bot:\n\n\u003cbr\u003e\n\n1. **Channel Setup**:\n\n    - The bot can be set up in any channel of your Discord server.\n    - This is an example of a proper setup. Copy the category ID and paste it in the `.env` file.\n    - Yours does not need to be the same. Just make certain you use the correct channel IDs.\n\n        ![Channel Setup](https://i.imgur.com/ex0aM7t.png)\n\n\u003cbr\u003e\n\n2. **Thread Listing**:\n\n    - This is an example of the thread listing within the threads section that is to be used for generic agent interaction.\n    - Copy the thread channel ID and paste it in the `.env` file.\n\n        ![Thread Listing](https://i.imgur.com/iImvMSV.png)\n\n\u003cbr\u003e\n\n3. **Help DB**:\n\n    - The bot can provide help related to database commands.\n    - Use the `/helpdb` command to get a list of all database related commands.\n\n        ![Help DB](https://i.imgur.com/zlTwiwT.png)\n\n\u003cbr\u003e\n\n4. **Ingest DB**:\n\n    - The bot can ingest data into the database.\n    - Currently, the only supported data type is ReadTheDocs URLs.\n    - Example: https://gpt-engineer.readthedocs.io/en/latest/\n    - Use the `/ingestdb` command followed by the data you want to ingest and a name for the data.\n\n        ![Ingest DB](https://i.imgur.com/UbnrjV4.png)\n\n\u003cbr\u003e\n\n5. **List DB**:\n\n    - The bot can list all the data in the database.\n    - Use the `/listdb` command to get a list of all the data in the database.\n\n        ![List DB](https://i.imgur.com/fgbQvrn.png)\n\n\u003cbr\u003e\n\n6. **AI Chat**:\n\n    - The bot can interact with users in the specified Discord channel.\n    - Make a thread in the designated ai-chat thread, and the chatbot will automatically start interacting with you.\n\n        ![AI Chat](https://i.imgur.com/tVVMnYP.png)\n\n\u003cbr\u003e\n\n7. **Ask DB**:\n\n    - The bot can fetch information from the database.\n    - Use the `/askdb` command followed by your query and the db ID to get the required information.\n    - The ID is set to the `gpt-engineer-docs` database by default.\n\n        ![Ask DB](https://i.imgur.com/Y1enGPn.png)\n\n\u003cbr\u003e\n\n## Contributing to Discord-AI\n\nTo contribute to Discord-AI, follow these steps:\n\n\u003cbr\u003e\n\n1. Fork this repository.\n2. Create a branch: `git checkout -b \u003cbranch_name\u003e`\n3. Make your changes and commit them: `git commit -m \u003ccommit_message\u003e`\n4. Push to the original branch: `git push origin \u003cproject_name\u003e/\u003clocation\u003e`\n5. Create the pull request.\n\nAlternatively, see the GitHub documentation on [creating a pull request](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request).\n\n\u003cbr\u003e\n\n## Credits \u0026 Thanks\n\nI'm grateful to the creators of these open source projects:\n- [Langchain-Chatbot](https://github.com/Haste171/langchain-chatbot) by Haste171\n\n\u003cbr\u003e\n\nTheir contributions have enhanced and reduced workload for our chat bot's functionality and streamlined documentation. \u003cbr\u003e\nThank you, Haste171, for inspiring developers and allowing others to incorporate and use your work.\n\n\u003cbr\u003e\n\n## License\n`Discord-AI` is completely open source, licensed under the [MIT](https://opensource.org/licenses/MIT) license.\nSee [LICENSE.md](https://github.com/RareMojo/Discord-AI/blob/main/LICENSE.md) for more information.\n\nLogo was made with the amazing and fun to use [Stable Diffusion](https://huggingface.co/stabilityai)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraremojo%2Fdiscord-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraremojo%2Fdiscord-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraremojo%2Fdiscord-ai/lists"}