Giter Club home page Giter Club logo

pzserverdiscordbot's Introduction

Project Zomboid Discord Bot for Server Management

This bot is written for people to easily manage their Project Zomboid server using Discord. Please check the Installation and Bot Configuration section. Also this bot doesn't support multiple discord servers and only works on Windows operating system. Be sure to have .NET Framework 4.7.2 installed on the machine.

Contents

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
  • Localization system! You can check available localizations using !localization command. See the Localization section about how to translate the bot. Note: It is not possible to translate commands and their descriptions at the moment. It might change in future, though.

Installation

Creating the Discord Bot

  1. Go to Applications section of Discord developer portal. (Be sure to login first.)
  2. Click to New Application button on the top right corner of screen.
  3. Enter your Bot's name in pop-up then click to create button. You will be redirected to your application's (bot's) page. In that page, you can update your bot's name, description and even load an image as avatar.
  4. Navigate to Bot section from left menu. Then click to Add Bot button. Then confirm the pop-up. You will be redirected to your bot page.
  5. Click to Reset Token button. Then confirm the pop-up. This will create a new token for your bot. Copy the displayed token and save it in a file. You won't able to view your bot token unless you reset it again. Also do not share this token with anyone. It's basically password of your bot. If you share it with someone else, they will have full control on your bot.
  6. Navigate to OAuth2 section from left menu and select the URL generator from dropdown. Check bot from Scopes section and scroll down to Bot Permissions.
  7. Check the options shown below and copy the generated URL.
  8. Open the copied link on your browser. In the page, select the server (you must be admin on the server otherwise server won't show up but you can always send the link to an admin which they can authorise the bot) that you want bot to work in. Click to Continue button and then to Authorise button. Complete the captcha if it pops-up. Now Bot has joined to your server but it's not running yet.

Installing Bot Files

To complete this step and next step, you must have remote access to your Windows machine.

  1. Navigate to releases and pick a binary version. I would suggest picking the latest version as it would consist new features and bug fixes.
  2. Download the zip archive.
  3. Extract the contents in the archive to the Project Zomboid Dedicated Server folder. Your directory after extraction will look like the image below.
  4. Rename the bat file you were using to start the server as server.bat. For example, if you were using StartServer64.bat, rename it as server.bat.

Writing the Discord Bot Token Into File

  1. Create an empty text file in the directory and name it as bot_token.txt and open it.
  2. Paste the bot token that you saved while creating the discord bot to the first line. (It will look like the picture below.)
  3. Save the file and close it.

Now all you need to do is running PZServerDiscordBot.exe. If you did setup everything correctly, program will automatically run the Discord bot at background and will show the Project Zomboid Server in the console. (Bot may not send the warning messages about the configuration if your discord server's last created channel is not accessable by the bot. You can just type configuration commands regardless.)

Note:
If you never run the project zomboid server before, please run it without using bot. Because when you run the project zomboid server for the first time, it will ask you to setup an admin account. You can't send any key presses to console if you run the server through discord bot's exe file. This also means you can't execute servers commands directly using the console but I did setup all commands in discord bot.

Warning:
If bot doesn't respond to any commands, that could be mean two things:

  • Bot doesn't have permission to see the channel. Be sure that bot has full access on the channel which also includes permission to send messages. After confirming bot has full access but still won't respond, see below.
  • Bot has missing intents configuration. Please head to discord developer portal (which is the place you did create and set up your bot), select your bot, click to the Bot tab on left menu and be sure that all bot intentions are enabled under the Privileged Gateway Intents section. Bot Intents Example

Bot Configuration

This bot uses 3 different channels to operate. First channel is Public channel where users can interact with bot. Second channel is Command channel where must set to be only visible to server admins. This channel is used for executing server management and bot configuration commands. Third channel is Log channel. There aren't any commands to execute in this channel and it's set for bot to announce stuff. After the bot launched for first time (or not configured), it will ask you to configure the mentioned three channels using !set_command_channel, !set_log_channel and !set_public_channel commands. Those commands are very easy to use. Just reply to any channel with the tag of the channel you want the bot to be configured in. For example: !set_public_channel #bot-public

Bot Configuration Example

Bot Commands

!help command can be used in any of configured 3 channels which bot will respond with the available command list for that channel.

Public Channel

  • !bot_info Displays information about this bot. (!bot_info)
  • !server_status Gets the server status. (!server_status)
  • !restart_time Gets the next automated restart time. (!restart_time)
  • !game_date Gets the current in-game date. (!game_date)

Command Channel

Bot Commands:

  • !set_command_channel Sets the channel for bot to work in. (!set_command_channel [channel tag>)
  • !set_log_channel Sets the channel for bot to work in. (!set_log_channel [channel tag])
  • !set_public_channel Sets the channel for bot to work in. (!set_public_channel [channel tag])
  • !get_settings Gets the bot settings. (!get_settings)
  • !get_schedules Gets the remaining times until schedules to be executed. (!get_schedules)
  • !get_ram_cpu Gets the total RAM and CPU usage of the machine. (!get_ram_cpu)
  • !set_restart_schedule_type Set the server's restart schedule type. (!set_restart_schedule_type ["interval"|"time"])
  • !set_restart_time Set the server's restart time(s). The time format is "HH:mm" (using 24-hour time). Server restart schedule type must be "time". (!set_restart_time [times separated by space])
  • !set_restart_interval Set the server's restart schedule interval. Restart schedule type must be "interval". (in minutes!) (!set_restart_interval [interval in minutes])
  • !set_mod_update_check_interval Set the workshop mod update check schedule interval. (in minutes!) (!set_mod_update_check_interval [interval in minutes])
  • !set_mod_update_restart_timer Sets the restart timer for server when mod update detected. (in minutes!) (!set_mod_update_restart_timer [timer in minutes])
  • !toggle_non_public_mod_logging Bot will print out non-public mods to log channel if enabled. (!toggle_non_public_mod_logging)
  • !set_perk_cache_duration Set the perk cache duration. (in minutes!) (!set_perk_cache_duration [duration in minutes])
  • !reset_perk_cache Reset the perk cache. (!reset_perk_cache)
  • !toggle_server_auto_start Enables/Disables the server auto start feature if server is not running. (!toggle_server_auto_start)
  • !backup_server Creates a backup of the server. Backup files can be found in "server_backup" folder in the directory where bot has been launched. (!backup_server)
  • !localization Get/change current localization. (!localization [(optional) new localization name])

Server Commands:

  • !server_cmd Allows you to send inputs to the server console. (!server_cmd [text])
  • !server_msg Broadcasts a message to all players in the server. (!server_msg "[message]")
  • !start_server Starts the server. (!start_server)
  • !stop_server Saves and stops the server. (!stop_server)
  • !restart_server Restarts the server. (!restart_server)
  • !initiate_restart Initiates a restart. (!initiate_restart [minutes until restart])
  • !abort_restart Aborts an upcoming restart. Works both with restart schedule and manual initiated restart. (!abort_restart)
  • !save_server Saves the current world. (!save_server)
  • !perk_info Displays the perk information of player. (!perk_info "[username]")
  • !add_user Adds a new user to the whitelist. (!add_user "[username]" "[password]")
  • !add_user_to_whitelist Adds a single user connected with a password to the whitelist. (!add_user_to_whitelist "[username]")
  • !remove_user_from_white_list Removes a single user connected with a password to the whitelist. (!remove_user_from_whitelist "[username]")
  • !ban_steamid Bans a Steam ID. (!ban_steamid [steam id])
  • !unban_steamid Unbans a Steam ID. (!unban_steamid [steam id])
  • !ban_user Bans a user. (!ban_user "[username]")
  • !unban_user Unbans a user. (!unbanuser "[username]")
  • !make_admin Gives admin rights to a user. (!make_admin "[username]")
  • !remove_admin Removes admin rights to a user. (!remove_admin "[username]")
  • !kick_user Kicks a user from the server. (!kick_user "[username]")
  • !start_rain Starts rain on the server. (!startrain)
  • !stop_rain Stops rain on the server. (!stoprain)
  • !teleport Teleports a player. (!teleport "[username1]" "[username2]") | Username 1 will be teleported to Username 2.
  • !add_item Gives an item to the player. (!add_item "[username]" "[module.item]")
  • !add_xp Gives XP to a player. (!addxp "[username]" "[perk]" [xp])
  • !chopper Places a helicopter event on a random player. (!chopper)
  • !godmode Makes a player invincible. (!godmode "[username]")
  • !invisible Makes a player invisible to zombies. (!invisible "[username]")
  • !noclip Allows a player to pass through solid objects. (!noclip "[username]")
  • !show_options Shows a list of current server options and values. (Prints to the server console) (!show_options)
  • !reload_options Reloads server options. (!reload_options)
  • !change_option Changes a server option. (!change_option "[option]" "[newOption]")
  • !add_workshop_mod Adds a workshop mod from the workshop mod url. (!add_workshop_mod [workshop mod urls with spaces in-between])
  • !remove_workshop_mod Removes a workshop mod from the workshop mod url. (!remove_workshop_mod [workshop mod urls with spaces in-between])

Localization

You can find the default localization file in here. All you need to do is downloading it and translating the all words/sentences in the right side of ":" between two quote marks. Example below will illustrate how it should look like after the translation.

Before translation:

{
  "gen_enab_up": "Enabled",
  "gen_disa_up": "Disabled",
  "gen_hours_text": "hour(s)",
  ...
  "warn_server_not_running": "Server is not running.",
  "warn_bot_conf_not_done": "Bot configuration haven't done yet.",
  ...
}

After translation:

{
  "gen_enab_up": "Aktif",
  "gen_disa_up": "Pasif",
  "gen_hours_text": "saat",
  ...
  "warn_server_not_running": "Server çalışmıyor.",
  "warn_bot_conf_not_done": "Bot ayarları henüz tamamlanmadı.",
  ...
}

Warning: There might be cases where you can see some weird expressions like {log_file}, {current_version}, {state} etc. These are special expressions that will be replaced with related value before displaying the text. Do not translate these. However, you can move them freely in a sentence and match them with your own language's sentence structure.

Some examples of how some of the expressions will look like after the related value replacement:

{day}/{month}/{year} -> 19/12/2022
{year}-{month}-{day} -> 2022-12-19

Bot Version: {version}  -> Bot Version: v1.8.0
Bot Version ({version}) -> Bot Version (v1.8.0)

Server auto start feature has been {state}.      -> Server auto start feature has been enabled.
Non-public mod logging feature has been {state}. -> Non-public mod logging feature has been disabled.

{hours} hours ago -> 10 hours ago
hours ago {hours} -> hours ago 10

After you have completed translating all words/sentences, please create an issue by selecting the Localization Submission template with the title of Localization of <language here> and attaching the translated .json file in a zip archive. I will add it to available localizations. Also, when a new version of the bot released, there might be new added text so it is good to keep an eye on updates. If your current localization is missing the new added text, bot will use the default localization for these.

pzserverdiscordbot's People

Contributors

domicidaldesigns avatar egebilecen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

pzserverdiscordbot's Issues

New Issue Starting

Hi man :) i'm getting this error with a new bot, it's important?


Exception: System.Exception
Message: WebSocket connection was closed
Stack trace: in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in Discord.ConnectionManager.d__34.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
in Discord.WebSocket.DiscordSocketClient.d__114.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in Discord.ConnectionManager.d__31.MoveNext()
--- Fine traccia dello stack da posizione precedente dove è stata generata l'eccezione ---
in System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
in Discord.ConnectionManager.<>c__DisplayClass29_0.<b__0>d.MoveNext()
Date: 30/12/2022 12:38:20 UTC
Bot Version: v1.8.1


Exception: Discord.Net.WebSocketClosedException
Message: The server sent close 4014: "Disallowed intent(s)."
Stack trace: in Discord.Net.WebSockets.DefaultWebSocketClient.d__34.MoveNext()
Date: 30/12/2022 12:38:20 UTC
Bot Version: v1.8.1

Issue with workshop restart script

Hey i just wanted to let you know on your beta version checking for workshop updates it works perfect for the first part when an addon update is detected, but after that it keeps thinking addon has been update and goes in an infinite restart loop.

How to solve the problem stop working?

`

[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2752895143
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2776633989
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2769995104
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2839351261
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2623458493
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2886832936
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2877551501
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2921029369
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2688676019
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2920899878
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2877607825
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2771297715
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2719592131
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2960610027
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2847449198
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2844829195
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2730975264
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2196102849
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2844315442
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2900580391
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2799152995
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2846749485
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2671890843
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 1516836158
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2463499011
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2712480036
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2917420415
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2567438952
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2698830069
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2937786633
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2767472803
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2752664795
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2832981720
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2908013174
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2932853467
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2883603166
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2941053465
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2809497084
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2846623627
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2957935793
[17/04/2023 17:29:11 UTC] SteamWebAPI.GetWorkshopItemDetails() - Workshop Item ID: 2960474000
[17/04/2023 17:29:39 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:30:09 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:30:39 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:31:10 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:31:40 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:32:10 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:32:41 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:33:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[17/04/2023 17:33:41 UTC] [AutoServerStart Schedule] Server is not running. Attempting to start the server.

.`

This is why the server stopped working.
[17/04/2023 17:33:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
How to solve the problem stop working?

the bot is deconfigured for some reason

Hello, after working for several hours with the bot configured, suddenly and without warning it gets disconfigured and the command channel id is set to 0. thus having to reconfigure the bot to make it work. any solution? as a small note I leave, that I do not edit the channels or delete them or anything since this is happening to me.

{
"GuildId": 639228542076321812,
"CommandChannelId": 0,
"LogChannelId": 1102723611929882654,
"PublicChannelId": 1102723611929882654,
"ServerLogParserSettings": {
"PerkParserCacheDuration": 10
},
"ServerScheduleSettings": {
"ServerRestartSchedule": 21600000,
"WorkshopItemUpdateSchedule": 600000,
"WorkshopItemUpdateRestartTimer": 900000
},
"BotFeatureSettings": {
"AutoServerStart": false,
"NonPublicModLogging": false
},
"LocalizationInfo": null
}

Features (suggestions)

Heya!

I would like to see a settings file like https://github.com/PaddiSson/project_zomboid_bot

RCON_PASS=SuperPassword
RCON_SERVER=127.0.0.1
RCON_PORT=27015
DISCORD_GUILD="My Discord Server"
DISCORD_TOKEN=CoolTokenHere
ADMIN_ROLES="Admin, Moderator"
LOG_PATH="/home/steamd/Zomboid/Logs"
NOTIFICATION_CHANNEL="123123211"
INGAME_CHANNEL="123123123123213"
PROCESS_NAME="ProjectZomboid64"
WHITELIST_ROLES="Survivor"
SERVER_ADDRESS="69.164.202.83:16261"

This bot have a terminate feature and CPU & RAM usage, really useful https://github.com/Jimloe/Project-Zomboid-Server-Manager

Here are some other ideas
Useful stats https://github.com/ChrisAshtear/Zomboid-Server-Stats-Reporter
Useful tools https://github.com/Dimens101/Watchdog
Map cleaner https://github.com/LordIkol/PZ_MapCleaner

Command Suggestion

Hello,

Can i suggest

!initiate_shutdown
!initiate_backup
!set_backup_interval

Will be really helpful

Thanks a lot for the great work!

Mods update

Thanks a lot for this great bot!

Can you please give us the option to make the bot check for mods updates?

  • check for updates every x s/m/h
  • notify in-game & discord about the update
  • restart the server after x s/m/h and notify countdown in-game & discord

JonnyPtn/zomboi#37

Will be all-in-one bot!

Thank you again!

Mod Checker Not Working

Hi, ty for the bot. Atm im using the bot on a dedicated server (windows based) the mod checker is not working we got a mod update but not check came up, i waited 2 circle of setted time, in my case was every 30 minutes. Afetr 1 hour i setted at 5 minutes but anything. Let me know how to help. Maybe if you can put a command to activate this restart could be more easy to find the problem. ty

send custom command to server !custom (any string with spaces) qol

use any pz server commands remotally is a good feature, and discord window doesnt allow us to rite server commands on it terminal (its read only) but its is possible to use terminal to send custom pz server without / comands used in chat by admin with / on beginning

p2p failure

Since I upgraded the bot to 1.2.5 people that join the sever can sometimes get a peer-to-peer failure. I have to close the console and restart it again in order for it to work. Restart via discord bot doesnt work in this case. I can probably turn off p2p and open some ports but wanted to share if it is a problem you can fix or atleast be beware of it. (if its a issue that are connected to the bot, I dont really know for sure).

Im very grateful for this bot so Im not complaining so you know :)

Best regards Kraket.

having some issues

hey i been having some issue with this bot could be that very new to this stuff

!game_date
OLA
BOT
— Today at 4:42 PM
Could not find a part of the path 'C:\Users\TCAGame\Zomboid\Server'.

!get_ram_cpu
OLA
BOT
— Today at 4:46 PM
Object reference not set to an instance of an object.

The Eye — Today at 4:41 PM
!server_status
OLA
BOT
— Today at 4:41 PM
Unknown command.

!restart_time
OLA
BOT
— Today at 5:03 PM
Unknown command.

!bot_info
OLA
BOT
— Today at 5:04 PM
Unknown command.

The Eye — Today at 6:56 AM this one been trying to find where i config file so it excutes this command
!restart_server
OLA
BOT
— Today at 6:56 AM
Bot configuration haven't done yet.

Unknown command using any channel or command

Hello, the bot is not accepting any of the mentioned commands on Discord. Using a new bot token, Windows environment variables are set, and the bot is having administrator permissions.
image

!players

I have a suggestion about new feature, can you make a command for checking current user number? I used to type 'players' in startserver64.bat cmd, but I can't type it in cmd anymore with your bot. so It would be great if you add a checking player number command which I can use in discord channel.

question about executable

Hi,

Is there any way that it is possible to allow triggering manual command input at the .exe prompt?

Example

I want to type some native PZ command directly into the executable itself.

Is there such a possibility?

Is this possible to implement?

I hope I didnt post this inte the wrong way! I just wonder if it is possible for you to implement something that helps with server updates, not just mods? When a server update comes by now I need to close the terminal and start it again in order for it to update. Maybe Im stupid or something but atleast I can ask :)

Linux Support

I suggest building a version of the bot that can run on Linux, since the Pjz server is already quite heavy, and running it on a Linux machine could help with performance.

error when translating to Brazilian Portuguese

when placing the command (!localization Português Brasileiro) that is right. but this appears (The input text has too many parameters.) I can put it in all the languages of the site but not this one.

Error unknown

Hi egebilecen, how u doing?

In the console this message begin to appear:

An error occured and discord bot has been disconnected! Error details are saved into .\pzbot.log file.
Please refer to "https://github.com/egebilecen/PZServerDiscordBot/issues" and create an issue about this with the log file.

I check the log file, and then:


Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: s
Stack trace: at System.IO.StringReader..ctor(String s)
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at SteamWebAPI.d__3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Schedules.<>c__DisplayClass4_0.<b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52
Date: 19/01/2023 20:23:40 UTC
Bot Version: v1.9.0
Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker
(THIS IS AN INNER EXCEPTION, NUMBER 1)

[19/01/2023 20:23:40 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:24:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:24:41 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:25:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:25:41 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:26:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:26:41 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:27:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...


Exception: System.Exception
Message: WebSocket connection was closed
Stack trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.ConnectionManager.<>c__DisplayClass29_0.<b__0>d.MoveNext()
Date: 19/01/2023 20:27:18 UTC
Bot Version: v1.9.0


Exception: Discord.Net.WebSocketClosedException
Message: The server sent close 1001: "CloudFlare WebSocket proxy restarting"
Stack trace: at Discord.Net.WebSockets.DefaultWebSocketClient.d__34.MoveNext()
Date: 19/01/2023 20:27:18 UTC
Bot Version: v1.9.0

[19/01/2023 20:27:41 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:28:11 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:28:42 UTC] WebRequest.PostAsync() - Response status code is not 200. Status code: BadRequest | URL: https://api.steampowered.com/ISteamRemoteStorage/GetPublishedFileDetails/v1/


Exception: System.ArgumentNullException
Message: Value cannot be null.
Parameter name: s
Stack trace: at System.IO.StringReader..ctor(String s)
at Newtonsoft.Json.Linq.JToken.Parse(String json, JsonLoadSettings settings)
at SteamWebAPI.d__3.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Util\SteamWebAPI.cs:line 80
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Schedules.<>c__DisplayClass4_0.<b__0>d.MoveNext() in C:\Documents\Programming\C#\PZServerDiscordBot\src\Bot\Schedules\WorkshopItemUpdateChecker.cs:line 52
Date: 19/01/2023 20:28:42 UTC
Bot Version: v1.9.0
Exception occured in ScheduleItem callback function. ScheduleItem: WorkshopItemUpdateChecker
(THIS IS AN INNER EXCEPTION, NUMBER 1)

[19/01/2023 20:28:42 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...


Exception: System.Exception
Message: WebSocket connection was closed
Stack trace: at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.ConnectionManager.<>c__DisplayClass29_0.<b__0>d.MoveNext()
Date: 19/01/2023 20:29:07 UTC
Bot Version: v1.9.0


Exception: System.Net.WebSockets.WebSocketException
Message: The remote party closed the WebSocket connection without completing the close handshake.
Stack trace: at System.Net.WebSockets.WebSocketBase.WebSocketOperation.d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Net.WebSockets.WebSocketBase.d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Discord.Net.WebSockets.DefaultWebSocketClient.d__34.MoveNext()
Date: 19/01/2023 20:29:07 UTC
Bot Version: v1.9.0

[19/01/2023 20:29:12 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:29:42 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:30:12 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:30:42 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:31:12 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...
[19/01/2023 20:31:42 UTC] [AutoServerStart Schedule] Either server is running or backup creator is running. Skipping...

Can you see whats going on, please?

Thank you in advance :)

Error

received_156582370674740~2.jpg

Hey love your work man, but i have this error me and my friend are really frustrated with it can you help us.

Anlık Perk bilgisi - Sunucuya giriş/çıkış bilgisi - ölüm bilgisi

1-Bir Kanal belirlenip sunucuda oynayan kişi bir yetenek seviyesi kazandığında o kanala bilgisini geçebilir.
2-Anlık perk bilgisi ile aynı kanal da biri ölünce ''xxx kullanıcı xx gün hayat da kaldı ve öldü'' gibi bir yazı yazabilir
3-Yine aynı kanal da biri sunucuya girdiğinde ''xxx Sunucuya giriş yaptı xx gündür yaşıyor'' gibi bir yazı yazabilir

Bu özellikler eklenirse çok tatlı olabilir başka bir sunucu da gördüğüm örnekleri bırakıyorum.

Screenshot_2
Screenshot_4
Screenshot_5

Autostart does not work.

Update in workshop mode and
Autostart does not work.

Check only 62 modes applied to the server.
The total number of modes applied is 102.

Çeviri problemi

Merhaba localization/default.json dosyasını türkçe çevirisini gerçekleştirip kaydettim ancak botun çevirisi gerçekleşmiyor halen ingilizce şekilde çalışıyor v1.7 dosyalarını v1.8 üzerinemi atmam gerekiyor yeni kurulum nasıl oluyor kafam karıştı yardımcı olursanız çok sevinirim teşekkürler...

!initiate_shutdown

Hello, thank you for maintaining and adding new features to the bot

A !initiate_shutdown / !abort_shutdown will be a perfect commands for updating the server or adding a new mod

restart at specific time

Hi,

Is it possible to change auto restarts to a specific time?

example:
Restart at 1am, 7am, 1pm and 7pm

Thanks

Admin Commands

Hello,

Can you please add more commands to the bot?

More important is the /reloadoptions, changing settings while the server is online

Do you mind sharing your discord ID?

Thanks

LIST OF GENERAL COMMANDS

Note: When using commands from the Control Panel, you will not need to add a / before commands.
NAME DESCRIPTION SYNTAX
additem Gives an item to the player. /additem “user” “module.item”
addvehicle Spawns a vehicle. /addvehicle “user”
addxp Gives XP to a player. /addxp “user” “perk=XP”
alarm Sounds a building alarm at the admin’s position. Must be in a room. /alarm
changeoption Changes a server option. /changeoption option="newOption"
chopper Places a helicopter event on a random player. /chopper
changepwd Changes your password. /changepwd “pwd” “newPwd”
createhorde Spawns a horde near a player. /createhorde “number”
godmode Makes a player invincible. /godmode “user”
gunshot Makes a gunshot noise near the player. /gunshot
help Brings up the help menu. /help
invisible Makes a player invisible to zombies. /invisible “user”
noclip Allows a player to pass through solid objects. /noclip “user”
quit Saves and quits the server. /quit
releasesafehouse Releases a safehouse you own. /releasesafehouse
reloadoptions Reloads server options. /reloadoptions
replay Records and plays a replay for a moving player. /replay “user” [-record | -play | -stop] “filename”
save Saves the current world. /save
sendpulse Toggles sending server performance info to the client. /sendpulse
showoptions Shows a list of current server options and values. /showoptions
startrain - stoprain Starts and stops rain on the server. /[start | stop]rain
teleport Teleports to a player. /teleport “toUser” or /teleport “user” “toUser”
teleportto Teleports to certain coordinates. /teleportto x,y,z

LIST OF MODERATION COMMANDS:

NAME DESCRIPTION SYNTAX
addalltowhitelist Adds all current users connected with a password to the whitelist. /addalltowhitelist
adduser Adds a new user to the whitelist. /adduser “user” “pwd”
addusertowhitelist - removeuserfromwhitelist Adds/removes a single user connected with a password to the whitelist. /addusertowhitelist “user”
banid - unbanid Bans/unbans a Steam ID. /[ban | unban]id “SteamID”
banuser - unbanuser Bans/unbans a user. /[ban | unban] “user”
grantadmin - removeadmin Gives or removes admin rights to a user. /[grantadmin | removeadmin] “user”
kickuser Kicks a user from the server. /kickuser “user”
players Lists all connected players. /players
servermsg Broadcast a message to all players. /servermsg “message”
setaccesslevel Set the access/permission level of a player. /setaccesslevel “user” “[admin | moderator | overseer | gm | observer]”
voiceban Ban a user from using the voice feature. /voiceban “user” [-true | -false]

Bot won't listen to any commands in discord?

I have tried your 2 previous versions and got it to work, but after trying to update to 1.2.4 it wont listen to any commands at all. So I tried to redo the whole thing and need to set command, log and public channels but no reactions from the bot at all. I have followed the guide and took the files from the Release-v1.2.4 map and the PZServerDiscordBot-main map and placed it in the dedicated server directory. Am I stupid or whats going on? The bot is online and have premissions to every channel also.

New Features and Fixes TODO

  • (Added with #22) Add bot intents configuration screenshot to README.md. (PSA: Enable all intents. Otherwise bot might not work properly.)
  • (Added with #38) Fix restart announcer. It announces 1 min left message two times as announcer's interval is 30 seconds.
  • (Added with #38) Improve restart announcer logic. For example, it announces 15 min left meanwhile 10 min left for the server restart. (This isn't issue with automated server restarts but when a mod update detected, bot owner might have set it to a value that isn't in announcement minute list which will cause the nearest minute in list to be announced. Just like the given example.)
  • (Added with #26) Prevent being able to set command and log channel into same channel. With #14, bot no longer responds to channels that has no commands assigned into them which is the case for the log channel as well. Note: You should still able to use !set_log_channel command in command channel without any issues.
  • (Added with #21) People are able to change their server's main directory in server.bat file with -Duser.home=<path> parameter. Example: -Duser.home=D:\Server1_Data. Take this into considiration when parsing server .ini files.
  • (Added with #26) Add a new command to see schedules' next execute time in minutes.
  • (Added with #26) Update bot version checker to send messages to command channel, not log channel. (Check if last message sent to the command channel is new version available message. If not, send message)
  • (Added with #26) Reduce message spam for workshop mod unlisted/private messages. (Perhaps make them being sent every day or when mod list updated)
  • (Added with #26) Add !bot_info command to public channel. It will print out bot information and repo link.
  • (Added with #26) Add semantic version class for performing efficient version checks.
  • Add filewatcher class. Will be used later for parsing log files.
  • Add in-game chat mirroring feature. (As a toggleable feature)
  • Add in-game notification mirroring feature. (As a toggleable feature. Such as logins, disconnects, deaths and perk changes)
  • Add feature to adding rotating auto announcement messages. (Messages will be announced in game.)
  • Add new command to update the bot to new version when server is not running.
  • (Added with #38) Update logging function to print out formatted string with date. This removes the need of getting and formatting date manually.
  • (Added with #38) Add a separate notification for pre-release version of bot to version checker.
  • (Added with #43) Add translation system. (And mention it in README)

Localization of latino

{
"gen_enab_up": "Habilitado",
"gen_disa_up": "Deshabilitado",
"gen_hours_text": "hora(s)",
"gen_minutes_text": "minuto(s)",
"gen_past_rel_time_one_sec": "hace un segundo",
"gen_past_rel_time_secs": "Hace {seconds} segundos ",
"gen_past_rel_time_one_min": "hace un minuto",
"gen_past_rel_time_mins": "hace {minutes} minutos",
"gen_past_rel_time_one_hour": "hace una hora",
"gen_past_rel_time_hours": "hace {hours} horas",
"gen_past_rel_time_yest": "ayer",
"gen_past_rel_time_days": "hace {days} días",
"gen_past_rel_time_one_month": "hace un mes",
"gen_past_rel_time_months": "hace {months} meses ",
"gen_past_rel_time_one_year": "hace un año",
"gen_past_rel_time_years": "hace {years} años ",
"gen_no_desc": "No hay descripción disponible",
"gen_last_cache_text": "El último caché fue a las {relative_time}.",
"bot_disc_chan_set_ok": "Canal <#{channel_id}> configurado correctamente para que funcione el bot.",
"warn_debug_mode": "ADVERTENCIA: el bot se está ejecutando en la configuración DEBUG.",
"warn_console_missing_conf": "Al bot le falta la configuración. Consulte {repo_url}#bot-configuration.",
"warn_server_not_running": "El servidor no se está ejecutando.",
"warn_bot_conf_not_done": "La configuración del bot aún no se ha realizado.",
"warn_bot_conf_cmd_chan": "Configura un canal para que el bot funcione usando el comando !set_command_channel command.",
"warn_bot_conf_log_chan": "Configura un canal para que el bot escriba registros usando el comando !set_log_channel command.",
"warn_bot_conf_pub_chan": "Configura un canal para que el bot acepte comandos en un canal público usando el comando !set_public_channel command.",
"warn_bot_wont_accept_cmd": "Bot won't accept any other commands until the steps above step(s) are completed. @everyone",
"warn_unknown_cmd": "Unknown command.",
"err_bot_token": "Couldn't retrieve bot token from "bot_token.txt" file.\nPlease refer to "{repo_url}#writing-the-discord-bot-token-into-file".",
"err_retv_bot_token": "An error occured while retrieving bot token. Error details are saved into {log_file} file.\nPlease refer to "{repo_url}/issues" and create an issue about this with the log file.",
"err_serv_bat": "Couldn't find "server.bat" file in the folder. Please rename the bat file you were using to start the server as "server.bat". For example, if you were using "StartServer64.bat", rename it as "server.bat" without quotes.",
"err_disc_auth_fail": "Authentication failed! Be sure your discord bot token is valid.",
"err_disc_disconn": "An error occured and discord bot has been disconnected! Error details are saved into {log_file} file.\nPlease refer to "{repo_url}/issues" and create an issue about this with the log file.",
"err_export_localization": "ERROR: no se pudo exportar el archivo de localización predeterminado!",
"info_disc_act_bot_ver": "Bot Version: {version}",
"info_bot_started": "Bot ({version}) is started. 🧟",
"info_bot_new_version": "There is a new version ({new_version}) of bot! Current version: {current_version}. Please consider to update from {repo_url}. If you enjoy the bot, please leave a ⭐ to repo if you haven't ☺️.",
"info_bot_new_early_version": "There is a new early access version ({new_version}) of bot! Current version: {current_version}. This early access version can be downloaded from Releases section of the repo. Repo link: {repo_url}. This version may not be stable as it is not extensively tested (which I also have no means to test it as I don't own a server so any help is appreciated) but it offers early access to the new features. If any problem occurs, you can always switch back to old version from the Releases section. If you observe any problem, please report it in Issues section.",
"info_export_localization": "INFORMACIÓN: la localización predeterminada se exportó correctamente!",
"disc_cmd_help_user_cmds_title": "Aquí está la lista de comandos:",
"disc_cmd_help_admin_cmds_title": "Lista de comandos de administración:",
"disc_cmd_help_bot_cmds_title": "Lista de comandos de bots:",
"disc_cmd_help_pzs_cmds_title": "Lista de comandos del servidor de Project Zomboid:",
"disc_cmd_set_command_channel_warn": "Channel <#{channel_id}> is configured to be log channel. Please select a different channel.",
"disc_cmd_set_log_channel_warn": "Channel <#{channel_id}> is configured to be command channel. Please select a different channel.",
"disc_cmd_get_settings_serv_id": "Server ID: {server_id}",
"disc_cmd_get_settings_cmd_chan_id": "Command Channel ID: {channel_id} (<#{channel_id}>)",
"disc_cmd_get_settings_log_chan_id": "Log Channel ID: {channel_id} (<#{channel_id}>)",
"disc_cmd_get_settings_pub_chan_id": "Public Channel ID: {channel_id} (<#{channel_id}>)",
"disc_cmd_get_settings_perk_cac_dur": "Perk Parser Cache Duration: {minutes} minute(s)",
"disc_cmd_get_settings_res_sch_int": "Restart Schedule Interval: {minutes} minute(s)",
"disc_cmd_get_settings_mod_sch_int": "Workshop Mod Update Checker Interval: {minutes} minute(s)",
"disc_cmd_get_settings_mod_rst_timer": "Workshop Mod Update Restart Timer: {minutes} minute(s)",
"disc_cmd_get_settings_serv_aut_strt": "Server Auto Start: {state}",
"disc_cmd_get_settings_mod_logging": "Non-public Mod Logging: {state}",
"disc_cmd_get_schedules_run": "{name} schedule will run <t:{timestamp}:R>.",
"disc_cmd_get_schedules_not_fnd": "No schedule found.",
"disc_cmd_set_restart_interval_int_warn": "El intervalo de reinicio debe ser de al menos 60 minutos.",
"disc_cmd_set_restart_interval_int_ok": "Server restart schedule is updated.",
"disc_cmd_set_mod_update_check_interval_int_warn": "Interval minutes cannot be smaller than 0. But it can be 0 which means there won't be any workshop mod update checking.",
"disc_cmd_set_mod_update_check_interval_int_ok": "Workshop mod update check schedule is updated.",
"disc_cmd_set_mod_update_restart_timer_warn": "El intervalo debe ser de al menos 1 minuto.",
"disc_cmd_set_mod_update_restart_timer_ok": "El temporizador de reinicio de actualización de mod de WorkShop se actualizo.",
"disc_cmd_toggle_non_public_mod_logging_ok": "Non-public mod logging feature has been {state}.",
"disc_cmd_set_perk_cache_duration_warn": "la duración no puede ser menor que 0. Pero puede ser 0, lo que significa que no habrá almacenamiento en caché.",
"disc_cmd_set_perk_cache_duration_ok": "Se actualiza la duración del caché de ventajas.",
"disc_cmd_reset_perk_cache_ok": "Se ha restablecido el caché de ventajas.",
"disc_cmd_toggle_server_auto_start_ok": "La característica de inicio automático del servidor ha sido {state}.",
"disc_cmd_backup_server_warn": "No se puede crear una copia de seguridad mientras el servidor se está ejecutando.",
"disc_cmd_backup_server_ok": "Iniciando la copia de seguridad del servidor. Puede verificar el progreso de la copia de seguridad en el canal de registro (<#{channel_id}>).",
"disc_cmd_backup_server_start": "Se inició la copia de seguridad del servidor. Total de {folder_count} folder(s) será respaldado.",
"disc_cmd_backup_server_item_done": "Copia de seguridad de {folder_name} esta completado. ({remaining_folder_count} folder left)",
"disc_cmd_backup_server_finish": "Se completó la copia de seguridad del servidor!",
"disc_cmd_localization_embed_title": "Información de localización actual",
"disc_cmd_localization_embed_language": "Idioma",
"disc_cmd_localization_embed_version": "Version",
"disc_cmd_localization_embed_desc": "Descripción",
"disc_cmd_localization_upd_ok": "La localización cambió con éxito a {localization} ({version}).",
"disc_cmd_localization_upd_exception": "Se produjo un error desconocido al cambiar la localización!",
"disc_cmd_localization_not_found": "no pude encontrar {localization} localización!",
"disc_cmd_localization_download_fail": "¡No se pudo descargar la localización! Por favor, inténtelo de nuevo más tarde...",
"disc_cmd_localization_update_text": "Hay una nueva versión para {localization} ({version})! Por favor use !localization \"{localization}\" comando para actualizar.",
"disc_cmd_localization_avaib_list": "Lista de localizaciones disponibles:",
"disc_cmd_localization_usage": "Por favor use !localization \"<localization name>\" comando para actualizar la localización actual. Puede restablecer la localización a los valores predeterminados utilizando !localization default comando.",
"disc_cmd_localization_no_localization": "No hay otras localizaciones disponibles en este momento.",
"disc_cmd_start_server_warn_running": "El servidor ya se está ejecutando.",
"disc_cmd_start_server_warn_backup": "No se puede iniciar el servidor durante la copia de seguridad en curso. Espere hasta que finalice la copia de seguridad.",
"disc_cmd_start_server_ok": "El servidor debe estar en camino de comenzar. Este proceso puede llevar un tiempo. Verifique el estado del servidor en 1 o 2 minuto(s).",
"disc_cmd_stop_server_warn": "El servidor ya está parado.",
"disc_cmd_restart_server_ok": "Reiniciando el servidor.",
"disc_cmd_initiate_restart_warn_min": "Los minutos no pueden ser 0. Use !restart_server en cambio.",
"disc_cmd_initiate_restart_info_server_msg": "Se ha iniciado un reinicio manual del servidor. El servidor se reiniciará en {minutes} minuto(s).",
"disc_cmd_initiate_restart_info_disc_msg": "Se ha iniciado el reinicio manual. El servidor se reiniciará en {minutes} minuto(s).",
"disc_cmd_abort_restart_ok_server": "El próximo reinicio ha sido abortado. El próximo reinicio ocurrirá en {minutes} minutos.",
"disc_cmd_abort_restart_ok_disc": "El próximo reinicio ha sido abortado.",
"disc_cmd_perk_info_no_result": "No se pudo encontrar ningún registro de beneficios relacionado con el nombre de usuario {username}.",
"disc_cmd_perk_info_result_title": "Información PERKS de {username}:",
"disc_cmd_bot_info_text": "Este bot está escrito para que las personas administren fácilmente su servidor usando Discord. Se puede acceder al código fuente y a los archivos bot desde {repo_url}. Si disfruta del bot, deje una ⭐ para hacer un repositorio si no lo ha hecho ☺️.",
"disc_cmd_server_status_running": "El servidor esta ENCENDIDO 🐹",
"disc_cmd_server_status_backup": "Actualmente el server backup está en proceso. 🔧",
"disc_cmd_server_status_dead": "El servidor esta MUERTO 💀",
"disc_cmd_restart_time_text": "El servidor se reiniciará <t:{timestamp}:R>.",
"disc_cmd_game_date_warn_file": "No se pudo encontrar el archivo de tiempo.",
"disc_cmd_game_date_response": "Current in-game date: {day}/{month}/{year}(Date is in DD-MM-YYYY aka European format)",
"sch_name_serverrestart": "Reinicio del servidor",
"sch_name_serverrestartannouncer": "Locutor de reinicio del servidor",
"sch_name_workshopitemupdatechecker": "Comprobador de actualización de mod de WORKSHOP",
"sch_name_autoserverstarter": "Iniciador de servidor automático",
"sch_name_botnewversioncchecker": "Comprobador de nueva versión de bot",
"sch_name_localizationnewversioncchecker": "Localization New Version Checker",
"sch_autoserverstart_text": "[Auto Server Starter] l servidor no se está ejecutando. Intentando iniciar el servidor.",
"sch_serverrestart_restart_text": "[Server Restart Schedule] Reiniciando el servidor.",
"sch_serverrestart_server_not_running": "[Server Restart Schedule] Server is not running. Skipping...",
"sch_serverrestartannouncer_text": "El servidor se reiniciará en {time_value} {time_text}.",
"sch_workshopitemupdatechecker_details_fail": "[Workshop Mod Update Checker] Cannot get the details of mod with the ID of {id}. It is either set as unlisted or private in Steam Workshop. Steam doesn't allow getting details of unlisted/private workshop items so if it is updated, bot won't detect it. (Result code: {code})\nMod Link: {link}",
"sch_workshopitemupdatechecker_log_chan_text": "[Workshop Mod Update Checker] A workshop mod update has been detected. Preparing to restart server in {minutes} minute(s).",
"sch_workshopitemupdatechecker_pub_chan_text": "[Workshop Mod Update Checker] A workshop mod update has been detected. Server will be restarted in {minutes} minute(s).",
"sch_workshopitemupdatechecker_server_announcement_text": "Se ha detectado la actualización de un mod. El servidor se reiniciará en {minutes} minuto(s)."
}

On stop, auto create backup

One of the things our server really needs is for the bot to create an auto backup on stop that is completed before it starts/restarts. With that, this bot would be perfect!

Backup & Restore

Hello,

Can i please request an:

  • Auto backup
  • Auto restore
    - Auto start up if the !stop_server command is not sent

Found this PZ backup utility, was really helpful
Backup and Restore.zip

The utility file only backup:
C:\Users\Administrator\Zomboid\Saves\Multiplayer\servertest

Is it possible to also backup these folders?
C:\Users\Administrator\Zomboid\Server\ (server settings)
C:\Users\Administrator\Zomboid\db\ (server.db file (accounts))
C:\Users\Administrator\Zomboid\Lua\ (mods usually save some of the settings in this file)

Thanks alot!

Hi

Hello.

Are you planning to do the Linux version?

Unable to use server commands

Hi how are you?, I started using you tool yesterday on my server, everything seemed to be fine I set the channels where the bot is going to send msgs and also specified the token of my bot for the tool to use, Im able to use commands like
image
but none of this ever worked
image
for what I see in the server console is just this

LOG  : General     , 1677086148609> 263,408,217> [RZF] Schedule need to change from     dayTime  to     dayTime . No change is necessary.
LOG  : General     , 1677086234385> 263,493,993> command entered via server console (System.in): "servermsg "a""
LOG  : General     , 1677086234856> 263,494,464> Unknown command servermsg "a"
LOG  : General     , 1677086291522> 263,551,129> command entered via server console (System.in): "invisible "Yokaio""
ERROR: General     , 1677086291563> 263,551,170> java.lang.NullPointerException: Cannot read field "accessLevel" because "this.connection" is null
ERROR: General     , 1677086291563> 263,551,171>        at zombie.commands.serverCommands.InvisibleCommand.Command(InvisibleCommand.java:40)
ERROR: General     , 1677086291564> 263,551,171>        at zombie.commands.CommandBase.Execute(CommandBase.java:131)
ERROR: General     , 1677086291564> 263,551,171>        at zombie.network.GameServer.handleServerCommand(GameServer.java:1157)
ERROR: General     , 1677086291564> 263,551,171>        at zombie.network.GameServer.main(GameServer.java:884)
LOG  : General     , 1677086299264> 263,558,872> [RZF] Schedule detected is     dayTime
LOG  : General     , 1677086299265> 263,558,873> [RZF] Checking if preset       dayTime  is enabled
LOG  : General     , 1677086299265> 263,558,873> [RZF] Schedule need to change from     dayTime  to     dayTime . No change is necessary.

does the tool need to run with Admin privileges or something?
I have also checked that my bot has the Privileged Gateway Intents, and they all checked
image
did I maybe missed something?

Terminal Window freezing

When using the bot, every so often the terminal window will become unresponsive. The server will stay up, but be unjoinable showing “server not responding” in game. Anyone in the server will stay in the server, but clients will only see themselves and none of the progress gets saved from when the freeze happens. It will only fox when I manually close the terminal window and relaunch the server. There isn’t any indication of errors or anything that I could see in the terminal window, and there doesn’t seem to be a specific time or query causing the freeze.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.