{"id":23537653,"url":"https://github.com/loic-simon/pcmc-bot","last_synced_at":"2025-05-15T00:21:36.295Z","repository":{"id":123979684,"uuid":"386249321","full_name":"loic-simon/pcmc-bot","owner":"loic-simon","description":"Discord bot to manage and communicate a hosted Minecraft server","archived":false,"fork":false,"pushed_at":"2021-07-23T21:14:05.000Z","size":146,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T07:31:06.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/loic-simon.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-07-15T10:24:48.000Z","updated_at":"2021-07-23T14:18:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d9d511ab-a0e2-4120-8bf4-be724e2224a1","html_url":"https://github.com/loic-simon/pcmc-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fpcmc-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fpcmc-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fpcmc-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/loic-simon%2Fpcmc-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/loic-simon","download_url":"https://codeload.github.com/loic-simon/pcmc-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254249289,"owners_count":22039041,"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":[],"created_at":"2024-12-26T03:17:10.336Z","updated_at":"2025-05-15T00:21:36.282Z","avatar_url":"https://github.com/loic-simon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pcmc-bot\n\n\u003c!-- [![PyPI](https://img.shields.io/pypi/v/pcmc-bot)](https://pypi.org/project/pcmc-bot)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pcmc-bot)](https://pypi.org/project/pcmc-bot)\n[![PyPI - Wheel](https://img.shields.io/pypi/wheel/pcmc-bot)](https://pypi.org/project/pcmc-bot)\n[![Read the Docs](https://img.shields.io/readthedocs/pcmc-bot)](https://pcmc-bot.readthedocs.io) --\u003e\n\nDiscord bot for managing and communicating with PC Minecraft server.\n\n*Please not that this project's source code (comments, docstrings) is written\nexclusively in French. The bot itself uses only French language; no\ninternationalization is available at this time.*\n\n\n## What's New in PCMC-Bot\n\nOnly major features are reported here; see [`CHANGELOG.md`](CHANGELOG.md)\nor in [the doc](https://pcmc-bot.readthedocs.io/fr/2.1.4/changelog.html) for\ndetails.\n\n### 1.0\n\n* Communication with Minecraft server (status, commands)...\n* In-game transmission of Discord messages \u0026 voice (dis)connections;\n\n\n## Installation\n\n\u003c!-- Use the package manager [pip](https://pypi.org/project/pip) to install pcmc-bot:\n```bash\npip install pcmc-bot\n``` --\u003e\nThis project is (for now) meant for private usage and therefore not published\non PyPI. Clone this repository to use it:\n```bash\ngit clone https://github.com/loic-simon/pcmc-bot.git\n```\n\nWe strongly recommand to install this package in a dedicated virtualenv\n(`python3 -m venv \u003cyourfolder\u003e`).\n\n\n### Dependencies\n\n* Python 3.8+\n* Packages: see [`requirements.txt`](requirements.txt)\n\n\n\n## Configuration\n\nTo run correctly, the bot needs to be connected to several external services,\neach needing more or less sensitive tokens, stocked as environments variables.\nWe support and encourage the use of\n[`python-dotenv`](https://pypi.org/project/python-dotenv/) to read them from\na `.env` file, but you may prefer exporting them as environment variables.\n\nAll necessary variables, prefixed by `PCMC_`, are listed in\n[`model.env`](model.env).\n\n\n\u003c!-- ### Configuration Assistant Tool\n\nWe provide a command-line assistant tool to help you set up every services and\ngenerate the `.env` file (which you can later `source` and delete if you wish).\n\nRun it simply with:\n```bash\npython -m pcmc\n```\n\nThis tool also creates a `start_bot.py` file containing the minimal code\nneeded to run the bot (see *Usage* section below). --\u003e\n\n\n\u003c!-- ### Manual configuration\n\nYou may prefer to manually write your environment variables, or just check\ninstructions regarding a specific one: they can be found in\n[`CONFIGURE.md`](CONFIGURE.md).\n\n**Warning**: the Configuration Assistant Tool checks every variable by\nrunning specific tests, which is not the case for manual configuration,\nso be sure of what you do! --\u003e\n\n\n\n## Usage\n\nThis package's external API consists essentially in a\n[`discord.ext.commands.Bot`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#bot)\nsubclass, **`PCMCBot`**, which implements every features needed.\n\nThe minimal code needed to run the bot in a configured folder  is:\n```py\nfrom pcmc import PCMCBot\n\nbot = PCMCBot()\nbot.run()\n```\n\n### Bot usage\n\nOnce the bot connected to your Discord server, send `!help` to see every\navailable commands (note: some commands are only visible by specific roles;\ngrant yourself the \"admin\" role to see everything.) \\\nUse `!help command` to get more information about a command.\n\n\u003c!-- For precisions relative to non-command features (such as \"IA\" reactions to\nmessages), look at the corresponding\n[documentation](https://pcmc-bot.readthedocs.io/) section. --\u003e\n\n\n### Customization\n\nSince `PCMCBot` is a subclass of\n[`discord.ext.commands.Bot`](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#bot),\nyou can use every arguments and methods it supports or subclass it to override\nexisting behavior.\n\nWe also provide a direct way to customize some parameters of the game and\nof the Discord server through [`config`](pcmc/config.py) module:\nroles/channels/emoji names, date of season beginning, inscription\ncustomization... See\n[the doc](https://pcmc-bot.readthedocs.io/fr/2.1.4/config.html)\nfor full API usage information.\n\nSee additional attributes and overriden methods on\n[the doc](https://pcmc-bot.readthedocs.io/) (mostly in French)\n\nSome useful examples:\n\n#### Change command prefix\n```py\nfrom pcmc import PCMCBot\n\nbot = PCMCBot(command_prefix=\"?\")\nbot.run()\n```\n\n#### Customize some config options\n```py\nfrom pcmc import PCMCBot, config\n\nconfig.Role.admin = \"BOSS\"\n\nbot = PCMCBot()\nbot.run()\n```\n\n\n#### Delete a command or alias\n```py\nfrom pcmc import PCMCBot\n\nbot = PCMCBot()\nbot.remove_command(\"command_name\")\nbot.run()\n```\n\n#### Add a command or change the behavior of a command\n```py\nfrom discord.ext import commands\nfrom pcmc import PCMCBot\n\n@commands.command()\nasync def mycommand(ctx, ...):\n    ...\n\nbot = PCMCBot()\nbot.remove_command(\"mycommand\")     # If replacing an existing command\nbot.add_command(mycommand)\nbot.run()\n```\n\n#### Enhance or replace the reaction to a Discord event\n```py\nfrom pcmc import PCMCBot\n\nasync def say_hello(bot, member):\n    await member.send(\"Hey!\")\n\nclass MyBot(PCMCBot):\n    \"\"\"Your customized bot class\"\"\"\n    async def on_member_join(self, member):\n        await say_hello(self, member)\n        super().on_member_join(member)      # Invoke the original reaction\n\nbot = MyBot()\nbot.run()\n```\n\nSee [discord.py documentation](https://discordpy.readthedocs.io) for more\nideas.\n\n\n\n## Contributing\n\nCommunity contributions are not welcome for now. Get in touch with the authors\n(see below) for any question or suggestion about this project.\n\n\n\n## License\nThis work is shared under [the MIT license](LICENSE).\n\n© 2020 Loïc Simon – GRIs – ESPCI Paris - PSL.\n\nReach me on Discord:\n[LaCarpe#1674](https://discordapp.com/users/264482202966818825) or by mail:\n[loic.simon@espci.org](mailto:loic.simon@espci.org)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floic-simon%2Fpcmc-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Floic-simon%2Fpcmc-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Floic-simon%2Fpcmc-bot/lists"}