{"id":18228791,"url":"https://github.com/spacemex/ai-bot","last_synced_at":"2026-05-08T15:03:55.529Z","repository":{"id":260983579,"uuid":"882893945","full_name":"spacemex/AI-Bot","owner":"spacemex","description":"A Simple Discord AI Assistant ","archived":false,"fork":false,"pushed_at":"2024-11-04T02:21:00.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T08:25:28.390Z","etag":null,"topics":["ai","apikey","bot","chatbot","chatgpt","discord","discord-bot","openai","token"],"latest_commit_sha":null,"homepage":"https://github.com/spacemex/AI-Bot?tab=readme-ov-file","language":"Java","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/spacemex.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":"2024-11-04T01:59:42.000Z","updated_at":"2024-12-01T15:35:58.000Z","dependencies_parsed_at":"2024-11-04T03:31:10.851Z","dependency_job_id":null,"html_url":"https://github.com/spacemex/AI-Bot","commit_stats":null,"previous_names":["spacemex/ai-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spacemex/AI-Bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemex%2FAI-Bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemex%2FAI-Bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemex%2FAI-Bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemex%2FAI-Bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacemex","download_url":"https://codeload.github.com/spacemex/AI-Bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacemex%2FAI-Bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266554103,"owners_count":23947265,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["ai","apikey","bot","chatbot","chatgpt","discord","discord-bot","openai","token"],"created_at":"2024-11-04T08:03:31.154Z","updated_at":"2026-05-08T15:03:50.499Z","avatar_url":"https://github.com/spacemex.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AI-Bot Discord Integration\n\n## Overview\n\nThis project integrates an AI chatbot into a Discord bot using OpenAI's GPT-3.5-Turbo model. Users can interact with the bot by asking questions, and the bot responds using the OpenAI API.\n\n## Features\n\n- Slash command `/ask` to ask the AI bot a question.\n- Rate-limiting and token count management to stay within OpenAI's usage limits.\n- Error handling and exponential backoff for rate-limited requests.\n\n## Prerequisites\n\n- Java Development Kit (JDK) 21\n- [Maven](https://maven.apache.org/) for dependency management\n- OpenAI API Key\n- Discord Bot Token\n\n## Getting Started\n\n### Clone the Repository\n\n```bash\ngit clone \u003crepository-url\u003e\ncd \u003crepository-directory\u003e\n```\n\n### Configuration\n\nCreate a `.env` file in the root of your project and add your API keys: `OPENAI_API_KEY=your_openai_api_key` `DISCORD_BOT_TOKEN=your_discord_bot_token`\n\nReplace `your_openai_api_key` and `your_discord_bot_token` with your actual OpenAI API key and Discord bot token.\n\n### Building the Project\n\nThis project uses Maven for dependency management and building. To build the project, navigate to the project directory and run:\n\n```bash\nmvn clean install\n```\n\n### Running the Bot\n\nAfter building the project, you can run the bot using the following command:\n\n```bash\njava -jar target/AI-Bot-1.0-SNAPSHOT.jar\n```\n\nReplace `AI-Bot-1.0-SNAPSHOT.jar` with the name of the JAR file created during the build process if it's different.\n\n## Project Structure\n\n- `src/main/java/com/github/spacemex/api`: Contains the OpenAI client for interacting with OpenAI's API.\n- `src/main/java/com/github/spacemex/util`: Contains utility classes and the command manager for processing Discord commands.\n\n## Usage\n\nOnce the bot is running, you can ask questions using the slash command `/ask` in your Discord server. The bot will respond with an answer generated by OpenAI's GPT-3.5-Turbo model.\n\n### Example\n\n### In Discord:\n##### /ask How can I integrate OpenAI with a Discord bot?\n## Bot's response:\n``To integrate OpenAI with a Discord bot, you need to...``\n\n## Contributing\n\nContributions are welcome! Please fork this repository and submit a pull request for review.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for more details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemex%2Fai-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacemex%2Fai-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacemex%2Fai-bot/lists"}