{"id":23209005,"url":"https://github.com/brochin5671/mc-discord-bot","last_synced_at":"2026-04-18T15:36:59.153Z","repository":{"id":268301898,"uuid":"903912670","full_name":"Brochin5671/mc-discord-bot","owner":"Brochin5671","description":"A simple Python program to deploy your Discord bot for your Minecraft Java server on your Discord server(s).","archived":false,"fork":false,"pushed_at":"2024-12-17T19:51:58.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-05T12:09:49.423Z","etag":null,"topics":["discord","discord-bot","java","mcstatus","minecraft","minecraft-server","pycord","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Brochin5671.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-12-15T21:44:37.000Z","updated_at":"2024-12-17T19:52:01.000Z","dependencies_parsed_at":"2024-12-15T22:28:24.097Z","dependency_job_id":"224c69d8-ef02-4dc1-8fbd-60c3fbafe648","html_url":"https://github.com/Brochin5671/mc-discord-bot","commit_stats":null,"previous_names":["brochin5671/mc-discord-bot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Brochin5671/mc-discord-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brochin5671%2Fmc-discord-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brochin5671%2Fmc-discord-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brochin5671%2Fmc-discord-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brochin5671%2Fmc-discord-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Brochin5671","download_url":"https://codeload.github.com/Brochin5671/mc-discord-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Brochin5671%2Fmc-discord-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263130981,"owners_count":23418380,"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":["discord","discord-bot","java","mcstatus","minecraft","minecraft-server","pycord","python"],"created_at":"2024-12-18T18:13:34.702Z","updated_at":"2026-04-18T15:36:54.986Z","avatar_url":"https://github.com/Brochin5671.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Server Discord Bot\n\n**By Maxim Brochin**\n\nA simple Python program to deploy your Discord bot for your Minecraft **Java** server on your Discord server(s). Has the ability to display the state of the server alongside other information using the package _[mcstatus](https://pypi.org/project/mcstatus/)_. Can also perform operations in Discord servers like purging messages.\n\nWhy I built this, see [Why?](#Why)\n\nMore features are planned, see [Planned Features](#Planned-Features)\n\n## Usage\n\n### Commands\n\n**These are all slash commands, prefixed with a `/`.**\n\n#### Owner\n\n- `reload`: Reloads the bot's cogs/extensions in the `./cogs` directory\n- `shutdown`: Closes the bot's connection to Discord\n\n#### Admin\n\n- `purge`: Purges a channel's messages, optional `limit` parameter\n\n#### User\n\n##### Minecraft Server Commands\n\n- `server status`: Displays the current state of the server alongside player count, player list, game and protocol version, and latency to bot. If the server is offline, it will use a saved value, displaying how long ago the server was previously online\n- `server ping`: Displays the server's latency between the bot\n- `server players`: Displays a list of players currently online\n\n### Tasks\n\n- **Status:** same as the command `server status`, displays the current state of the server alongside player count, player list, game and protocol version, and latency to bot. If the server is offline, it will use a saved value, displaying how long ago the server was previously online. **The bot must be provided a channel to post status updates about the server.**\n\n## Prerequisites\n\nEnsure your app is created and configured using the [Discord Developer Portal](https://discord.com/developers/docs/quick-start/getting-started#step-1-creating-an-app).\n**NOTE: You just need your bot token when following the instructions.**\n\nFind `server.properties` in the root directory of your Minecraft server folder. Ensure `enable-status` is set to `true`.\n\n```bash\n...\nenable-status=true\n...\n```\n\nEnsure that you are at least using **Python v3.11** and a Linux environment for the bot.\n\n## Setup\n\n**This assumes you are using a Linux environment.**\n\nClone the repository.\n\n```bash\ngit clone \"https://github.com/Brochin5671/mc-discord-bot.git\" \u0026\u0026 cd \"mc-discord-bot\"\n```\n\nInstall _virtualenv_ if you haven't already.\n\n```bash\npip install virtualenv\n```\n\nCreate a virtual environment.\n\n```bash\npython\u003cversion\u003e -m venv venv\n```\n\nActivate it.\n\n```bash\nsource env/bin/activate\n```\n\nUse the package manager _[pip](https://pip.pypa.io/en/stable/)_ to install requirements.\n\n```bash\npip install -r requirements.txt\n```\n\nCreate and configure your `.env` file.\n\n```bash\n# This will be the secret key for connecting to your bot\nBOT_TOKEN=\"\"\n# The Minecraft Java Server's IP\nMC_SERVER_IP=\"\"\n# A list of server IDs in the format \"\u003cid1\u003e,\u003cid2\u003e, ...\" or just one ID that your bot will be in\nGUILD_IDS=\"\"\n# The channel ID where the bot will post the Minecraft server's status\nSTATUS_CHANNEL_ID=\"\"\n# Name of the admin role to use certain slash commands\nADMIN_ROLE=\"\"\n# Path to the directory containing any bot-created files, leave empty if using the root directory\nDATA_PATH=\"\"\n```\n\nRun it.\n\n```bash\npython\u003cversion\u003e main.py\n```\n\n## Why?\n\nI wanted to expand on my Python understanding, reinforcing and learning concepts, building a system, and exploring what's possible. I was also killing some time by playing Minecraft: Java Edition with friends, so I thought this would be a great opportunity to demonstrate my skills and have others use the bot I built.\n\n## Planned Features\n\n### Commands\n\n- `server sysinfo`: Display the server's system information like CPU and memory usage\n- `sync`: Syncs the user's account with the given player in Minecraft (this will be used for stats and other operation later)\n- `player stats`: Display any player stats of the given player or user's. An optional `\u003cplayer_name\u003e` or `\u003cdiscord\n_name\u003e` argument can be provided\n\n### Ideas\n\n- More server commands and interactions (like an API to run certain commands securely without using RCON)\n- Fun ways of having used the sync feature like a measure of wealth based on the resources the player has\n\n### Improvements\n\n- Refactor code\n- Discover performance bottlenecks and **squash** them\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first\nto discuss what you would like to change.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrochin5671%2Fmc-discord-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrochin5671%2Fmc-discord-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrochin5671%2Fmc-discord-bot/lists"}