Jump to content

Discord Bot for Server Management (Windows Only)


Zaphiel

Recommended Posts

Project Zomboid Discord Bot for Server Management which I wanted to share with everyone who wishes to use it. You can find all the details about the bot in here: https://github.com/egebilecen/PZServerDiscordBot

 

I will copy/paste features from the README file below :D All feedback and feature requests are welcome.

 

Features

  • Automated server restart schedule with ingame and discord warning. (Warnings are announced when 1 hour, 30 min, 15 min, 5 min and 1 min left until server restart. Restart interval can be configured with bot commands.) Automated Server Restart Example
  • Automated server restart when a mod (workshop item) update has been detected. Automated Workshop Item Update Server Restart
  • Executing server commands through bot commands. (For example; saving server, kicking player, teleporting player, starting/stopping rain, making admin and so on. Full list will be at the bottom and will be listed under available commands.) Server Commands Example
  • Perk Parser with cache system. (Bot automatically parses the last perk log file that holds the player skills when they login to server. This can be used to aid players that died to a bug but they can't remember their skills. As stated before, server logs the player skills only when they log into server. If player levels up a skill after connecting to server, it won't appear in log unless player logs into server afterwards again.) When command for perk parser is invoked, bot will parse the file and save it contents in memory until cache (in minutes) expires. This is for to increase efficiency as bot will not have to parse the same file each time. In a situation where fresh data needed, !reset_perk_cache command can be used to reset the cache.
    Perk Parser Example
  • Auto server start if server quits. This feature useful if combined with mods that quits the server for whatever reason. For example, if you are using a mod that checks mod updates and when detects it, quits the server. With enabling this feature, you won't need to manually run the server.
    Auto Server Start Example
  • !get_ram_cpu command for checking current RAM and CPU usage of the machine. RAM CPU Command Example
  • !backup_server command for backing up the server easily.                    Backup Command Example 1 Backup Command Example 2
Edited by Zaphiel
updated features
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...
On 6/5/2022 at 3:51 AM, grim_reaper said:

any plans for linux version ?

 

Not for now. 

 

On 6/5/2022 at 11:37 AM, getstoopid said:

Since Discord .Net is advertised as multi-platform it should be built on .Net Standard/Core I think? May I suggest switching to .Net Core so the bot can be installed on Linux environments? 

I would need to check it but I am quite busy with work lately so I wouldn’t expect linux version any soon. :c

On 7/9/2022 at 4:18 PM, Grayhizi said:

hello, I want to Russify all sms that the bot sends to Discord. please help, in which files you need to change the text of sms

You need to modify every “string” in source code and build it by yourself. It doesn’t have a translation system. I could add such feature if bot was popular but I am not sure it is the case :)

 

(Sorry for late reply all)

Link to comment
Share on other sites

  • 1 month later...

Hello everyone. I recently published an update for bot to automatically check the workshop mod updates and restart the server in specified minutes after doing in-game announcements. I did some simulated tests but since I have no dedicated server, I can't run the bot for a long time. I am just dropping the link to the beta release in case of anyone wants to test it. :)

 

https://github.com/egebilecen/PZServerDiscordBot/releases

Edited by Zaphiel
Link to comment
Share on other sites

  • 2 months later...

Hello everyone, it's been a while. I kept adding new features since I last posted in this thread. :) Here is some quick sum of added new features:

 

* Added backup feature to backup server with just one command.

* Added support for custom server paths. With this, in one machine, you can run multiple servers using the bot.

* Added new command for getting current CPU and RAM usage of the machine.

* Added new command for getting current in-game date.

* Added new command to reload server options while server is running. (This command actually zomboid's server command. I did include it to available commands.)

* Added automatic new version checker for bot.

* Added feature to start server automatically if it closes for some reason. (Perhaps due to crash, etc.)

* Added toggleable option for printing out non-public mods. (Because Steam doesn't allow to get details of non-public mods, bot will not detect any update on them. With this option, owner can easily find which mods are non-public)

 

You can find source code, bot's files and installation details in here. If you liked the bot, please consider leaving a star to GitHub repo. :) Also, I am open to all feature suggestions. If you got something in your mind, please do share it using GitHub issues.

Edited by Zaphiel
typo
Link to comment
Share on other sites

On 11/23/2022 at 3:09 AM, Kell said:

Could you add a panel indicating the status of the server and online players so that users could see it?

Hey, I am not planning to display online players honestly. Because only way to display that is via using bot's "Playing" status. And I highly doubt people even search the bot in member list to see online players. Maybe a command can be added to public commands. Regardless, I need a log watcher system to do this which is in my todo list. But I don't know when I will start working on it.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 1 month later...
  • 1 month later...
  • 4 months later...

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...