{"id":41298309,"url":"https://github.com/yoggys/discord-minecraft-bot","last_synced_at":"2026-01-23T04:35:08.467Z","repository":{"id":254895852,"uuid":"847875599","full_name":"yoggys/discord-minecraft-bot","owner":"yoggys","description":"A Discord bot to integrate Minecraft server functionality, allowing users to link their Discord accounts with Minecraft and enabling administrators to manage players via Discord commands.","archived":false,"fork":false,"pushed_at":"2025-05-03T14:02:45.000Z","size":37,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-03T15:19:29.617Z","etag":null,"topics":["admin","bot","discord","mcrcon","minecraft","python","rcon","whitelist"],"latest_commit_sha":null,"homepage":"","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/yoggys.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-08-26T18:01:25.000Z","updated_at":"2025-05-03T14:02:48.000Z","dependencies_parsed_at":"2025-05-03T15:19:22.761Z","dependency_job_id":"a8e7cd05-101c-40dc-a437-68aee75c0f54","html_url":"https://github.com/yoggys/discord-minecraft-bot","commit_stats":null,"previous_names":["yoggys/discord-minecraft-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yoggys/discord-minecraft-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoggys%2Fdiscord-minecraft-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoggys%2Fdiscord-minecraft-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoggys%2Fdiscord-minecraft-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoggys%2Fdiscord-minecraft-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoggys","download_url":"https://codeload.github.com/yoggys/discord-minecraft-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoggys%2Fdiscord-minecraft-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","response_time":59,"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":["admin","bot","discord","mcrcon","minecraft","python","rcon","whitelist"],"created_at":"2026-01-23T04:35:07.683Z","updated_at":"2026-01-23T04:35:08.462Z","avatar_url":"https://github.com/yoggys.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Minecraft Bot\n\nA Discord bot to integrate Minecraft server functionality, allowing users to link their Discord accounts with Minecraft and enabling administrators to manage players via Discord commands.\n\n\u003cimg height=\"150\" src=\"https://github.com/user-attachments/assets/8c634d17-7c53-4342-9439-558f771cc920\" alt=\"/minecraft command example\"\u003e\n\u003cimg height=\"150\" src=\"https://github.com/user-attachments/assets/9eb0359f-d7b1-466b-8f5e-932581e0e057\" alt=\"/admin ban command example\"\u003e\n\n## Features\n\n- Link your Discord account with a Minecraft server via a `/minecraft` command.\n- Administrative commands for managing users, such as banning, checking user data, and whitelisting/removing users.\n- Optional support for executing any Minecraft server command via Discord.\n- Role-based permission checks and automatic role/server removal handling.\n\n## Commands\n\n### User Commands\n\n- **/minecraft**\n  - Link or unlink your Minecraft account.\n  - **Arguments**:\n    - `username` (optional): Your Minecraft username.\n\n### Admin Commands\n\n- **/admin check**\n  - Check user data associated with a Discord or Minecraft account.\n  - **Arguments**:\n    - `user`: Discord user.\n    - `username`: Minecraft username.\n\n\n- **/admin ban**\n  - Ban a user from the Minecraft server.\n  - **Arguments**:\n    - `user`: Discord user.\n    - `username`: Minecraft username.\n    - `reason` (optional): Reason for the ban.\n\n\n- **/admin unban**\n  - Unban a user from the Minecraft server.\n  - **Arguments**:\n    - `user`: Discord user.\n    - `username`: Minecraft username.\n\n\n- **/admin remove**\n  - Remove a user from the whitelist.\n  - **Arguments**:\n    - `user`: Discord user.\n    - `username`: Minecraft username.\n    - `reason` (optional): Reason for the removal.\n\n\n- **/admin restart**\n  - Restart the connection to the Minecraft server.\n\n\n- **/root** (optional)\n  - Execute any command on the Minecraft server.\n  - **Arguments**:\n    - `command`: The command to execute.\n\n## Environment Variables\n\nTo configure the bot, create a `.env` file in the root of your project with the following environment variables:\n\n```properties\n# Discord Bot token\nBOT_TOKEN=your_bot_token\n\n# Minecraft server RCON details\nHOST=minecraft_server_host\nPASSWORD=minecraft_server_password\nPORT=minecraft_server_port\n\n# Optional: Enable admin commands (set to True)\nADMIN_COMMANDS=true\n\n# Optional: Enable role/server removal check (set to True)\nEXPIRES=true\nCHECK_INTERVAL=interval_in_seconds\nGUILD_ID=guild_id_to_check\n\n# Optional: Comma-separated role IDs allowed to manage Minecraft usernames\nALLOWED_ROLES=role_id1,role_id2\n\n# Optional: Logs channel ID for tracking connections\nLOGS_CHANNEL=logs_channel_id\n```\n\n## Setup\n\n1. **Clone the repository**:\n   ```bash\n   git clone https://github.com/yoggys/discord-minecraft-bot.git\n   cd discord-minecraft-bot\n   ```\n\n2. **Install dependencies**:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n3. **Configure the `server.properties` file** within your Minecraft server directory to enable RCON access:\n   ```properties\n   # Enable RCON and set its properties\n   rcon.port=25575                     # Set the RCON port (default: 25575)\n   broadcast-rcon-to-ops=true          # Allow broadcasting RCON messages to ops\n   enable-rcon=true                    # Enable RCON functionality\n   rcon.password=your_password         # Set a strong password for RCON\n   ```\n\n4. **Open RCON Port** for Bot Communication:\n   ```bash\n   # Linux\n   sudo ufw allow 25575/tcp\n   \n   # Windows\n   netsh advfirewall firewall add rule name=\"Allow RCON Port\" dir=in action=allow protocol=TCP localport=25575\n   ```\n\n5. **Configure the `.env` file** with your bot token, Minecraft server credentials, and other optional settings.\n\n6. **Run the bot**:\n   ```bash\n   python main.py\n   ```\n\n## Requirements\n\n- Python 3.8+\n- SQLite (default database)\n\n## Database\n\nThis bot uses SQLite as the default database. On startup, the bot will automatically generate the required schemas using Tortoise ORM.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoggys%2Fdiscord-minecraft-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoggys%2Fdiscord-minecraft-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoggys%2Fdiscord-minecraft-bot/lists"}