Jump to content

[41.65] [Multiplayer] Discord Integration rename Bot to servername.


Recommended Posts

• Version: 41.65

• Session mode: Multiplayer.

• Server type: Dedicated.

• Has mods? Yes.

• Reproduction steps:

    1. Follow the discord bot integration setup post to initialize the integration.

    2. Make sure everything is okay and start the dedicated server.

    3. Sometimes you will see something in the logs like {username=servertest, password=null, somethingsomething=null}.
    4. If you saw step 3's log, your Discord Bot name will be renamed to your server's name (by default: servertest). If not it will be kept as you configured @ discord's app developer page.


• Commentary 01: I'm not 100% sure this is a bug, but it is definitely annoying to have to go back to the Discord's App Developer page just to rename the bot's name to the name you set up initially. If this is intentional then please, do ignore this report as it is not critical by any means.

• Commentary 02: Also, it is sending duplicate messages from discord room to game after reconnecting the bot [?] 

jan. 11, 2022 11:42:17 AM de.btobastian.javacord.utils.JavacordLogger info
INFORMATION: Websocket closed with reason null and code 1000 by client!
jan. 11, 2022 11:42:17 AM de.btobastian.javacord.utils.JavacordLogger info
INFORMATION: Could not resume session. Reconnecting now...


Edited by Kraft
Link to comment
Share on other sites

  • 4 months later...

Per my comment here:

You can write a command/script in the CLI to request a nickname change via API. I was also able to rename the bot via my Discord Server (under the members list), but you need to have nickname management rights/privileges.


Overall, I think the bot name should be decoupled from the server name, anyway, and be directly configurable. It's otherwise making unnecessary changes/requests to the portal, technically, renaming the bot on every server start.

Link to comment
Share on other sites

Discord integration is bugged as a hell, I suspect it is because zomboid uses ancient four-year-old Javacord version v2. Which was developed before Discord public API changes a few years back.


Maybe someday developers will update the bundled library to modern version v3.4.0+, as well as some relevant code pieces, and some bugs will be gone for the greater good.

Link to comment
Share on other sites

  • 1 year later...
  • 6 months later...
Posted (edited)

I've pulled my hair out over the insanity of actually renaming the server, FINALLY got it to rename.  Now, after having fought the bot for roughly 2 hours trying to figure out why it kept changing the server name to "servertest" even though the server name is forced to "Nosferatu Server" I discover there are ZERO options pointing out that bot update that happens at the very end of server launch.  the last reported console entry:

  • "INFO: Updated profile (username: servertest, email: null, password: null, change avatar: false"

The complete log relating to Discord Integration:


LOG  : Network     , 1717292345272> 252,187,677> *** DISCORD API CONNECTED ****
LOG  : Network     , 1717292345273> 252,187,678> Discord enabled on channel with ID: 1229413689396822037
LOG  : Network     , 1717292345393> 252,187,799> *** DISCORD INITIALIZATION SUCCEEDED ****
Jun 01, 2024 8:39:06 PM de.btobastian.javacord.utils.JavacordLogger info
INFO: Updated profile (username: servertest, email: null, password: null, change avatar: false


I'm going to see about adding a Java command like "-username" to force it to knock it the hell off already!  It's not rocket science, why doesn't it just leave it be instead of changing the bot settings I specifically set up to be a specific way.


This entire process of setting up the server has been both easy and insanely difficult.  Like out of all the servers I have setup this one has to be the lease straight forward, but at the same time EASIEST server I have ever setup.  The complete lack of a "set servername" option BEFORE launching the server was mildly infuriating, but then I had to google through a dozen results to find the -servername "SERVERNAME" setting to add to the batch file has to be my biggest peeve.

UPDATE: It would appear, after removing the permission to "Change Nickname" from the blanket role I made for all my bots to keep them tidy, organized, and easily manage their permissions, it has NOT attempted any self changes after startup completes.  Finally, I can relax and enjoy the game.

UPDATE 2: It has started changing the name again, this is ridiculous insanity.  Same console line as before.

Edited by Nafryti
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...