DenisD3D / Mc2Discord

Link your Minecraft server chat with your Discord (75k downloads)
https://modrinth.com/mod/mc2discord
Apache License 2.0
43 stars 11 forks source link

Added Minecraft logs and crash-reports related commands #110

Closed K0LALA closed 2 months ago

K0LALA commented 3 months ago

Added the option to list logs and crash-reports, display them and remove old ones in Discord: /list (filter): filter (optional) is equal to "logs" or "crash-reports" /display [name]: name (mandatory), will display the first file (starting in crash-reports, then in logs) which contains the name /remove (age): age (optional), will remove all files older than the age

Sorry, but I didn't tested this, since I don't really know how to build the project in a mod, but I would appreciate some help for this.

DenisD3D commented 3 months ago

Hi, Thanks for your PR. Although it looks good, this seems outside the scope of the mod for me. The goal is to provide access to default mincraft feature on Discord. As usefull as your command may be, they are not in the default game and so I won't merge your PR (for exemple, the list command already exist in the game and may cause confusion to users).

However, mc2discord provide an "extension"/"plugin" system that allow you to make your own mod, depending on mc2discord to access the Discord bot (the hard part in mc2discord is including and setuping the Discord library :) ). You have an exemple here https://github.com/DenisD3D/mc2discord-integration-exemple (You mostly need to copy paste your existing code in another project). If you need any help with it, feel free to join the Discord server. Also if you decide to publish your mod, I can link it from mc2discord mod page.

Lastly, for compiling, you need to import one of the folder into idea (e.g. mc2discord-1.20.x). Then you can use it like any other gradle project (./gradlew build, idea integration, ...). If you want you can also compile from GitHub using the GitHub action tab (use workflow "build all")

Denis