destruc7i0n / shulker

A Discord to Vanilla Minecraft Chat Gateway
ISC License
135 stars 47 forks source link

Ability to display when player joins/leaves or earns an achievement or dies in Discord #40

Closed TheZackCodec closed 4 years ago

TheZackCodec commented 5 years ago

Displaying when players join/leave the server

This feature is mainly to make it easy to see when people join. In my experience, when other on my server see that other players have joined, it causes them to hop on as well. It looks OK without web-hooks but it looks way better with them.

Example: image

Debug Output: image

Displaying when players earn and achievement

This simply shows when any player earns an achievement.

Example: image

Debug Output: image

Displaying when players die

This simply shows when a player dies in chat, I went through every possible death message in Minecraft and condensed them down into the DEATH_KEY_WORDS list in the config file.

Example: image

Debug Output: image

TheZackCodec commented 5 years ago

@BinaryCrafter Here you go, only two years late lol

destruc7i0n commented 5 years ago

Hey! Thanks for the PR. These are some good features, and I'd love to accept this, but there are a few comments I must make.

  1. The default server image, what is the license of it? While this project is MIT, I'd like images which may not be copyrighted - maybe make it a block of some sort?
  2. The achievement system is wonderful, but in newer versions they are advancements... Can you make the system work with them too?
  3. Were you using the local file hook for testing or the tail command? With testing, the tail command would not work with these changes, can you update it if possible? (If you are not familiar I would be happy to lend a hand with that)

Other than that, they are some welcome changes, can't wait to merge them in!

TheZackCodec commented 5 years ago

@destruc7i0n At first I wanted to make this work with MC instead of just reading the log file but then i realized that the whole point of this repo was to provide something that just read the log file and nothing more. To answer your questions.

  1. I'll change that image to something that I know is royalty free
  2. yes
  3. I was using local files, i have yet to try and implement the other method, you'll see that i only implemented it for local files right now for that very reason. I might need help later figuring that out. but, ill probably be able to figure it out

Possible Bug: it seems that for some reason every day or so the chat crashes because of an ECONNRESET, Looking at the log it looks like an error from discord. This however really ruins the "Joined" server feature since it looks like no one is ever joining since the chat will never report it. I've attached a log here if you want to take a look. I just want to make sure that the error it isn't related to my changes. This has happened before in the master branch however, it seems more frequent now. maybe you can handle the error and retry the connection instead of killing the chat.

chat_server_error.txt chat_server_error2.txt

I'm about to graduate soon so I wont have time to update this pull request until later next month.

destruc7i0n commented 5 years ago

Hey, any update on this?

Heath123 commented 4 years ago

You could edit it yourself

Heath123 commented 4 years ago

Also why does it use webhooks for joining and leaving?

destruc7i0n commented 4 years ago

Closing due to use and update in #47 ! Thanks again.