LakeYS / Dishorde

A Discord bridge bot for 7 Days to Die. Dishorde integrates a dedicated server with Discord, allowing players to access the game's chat from any device or location. Powered by discord.js.
http://lakeys.net/dishorde
MIT License
47 stars 27 forks source link

Chat handling updated + language friendly GSMG messages #147

Open xXFreeFunXx opened 3 months ago

xXFreeFunXx commented 3 months ago

Chat: Checking the player name with lpi Mapping is session based Mapping update on every join GSMG: Custom messages added to config.json Player name is taken from GSMG messages

xXFreeFunXx commented 3 months ago

Now compatible with 7 Days to Die 1.0!

LakeYS commented 3 months ago

This looks great! Will be testing ASAP.

LakeYS commented 2 months ago

Tested with it. Join/leave messages worked. I'm not able to get chat messages through due to the following error:

/home/lake/Dev/Discord/Dishorde/index.js:203
      content.name = playerIdNameMap[content.entityId] || "Unknown";
                     ^

ReferenceError: playerIdNameMap is not defined
    at handleMsgFromGame (/home/lake/Dev/Discord/Dishorde/index.js:203:22)
    at Telnet.<anonymous> (/home/lake/Dev/Discord/Dishorde/index.js:781:7)
    at Telnet.emit (node:events:520:28)
    at Socket.<anonymous> (/home/lake/Dev/Discord/Dishorde/node_modules/telnet-client/lib/index.js:84:23)
    at Socket.emit (node:events:520:28)
    at addChunk (node:internal/streams/readable:559:12)
    at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
    at Readable.push (node:internal/streams/readable:390:5)
    at TCP.onStreamRead (node:internal/stream_base_commons:191:23)

I did see the "Received empty response for player list" message go off before this happened.

Also, within the code: could you or someone translate the comments into English to keep things consistent?