egebilecen / PZServerDiscordBot

A Project Zomboid Discord Bot written in C# using Discord.NET to manage and execute commands on Project Zomboid Server.
GNU General Public License v3.0
61 stars 11 forks source link

Feature - Restart Server at Specific Times #94

Closed DomicidalDesigns closed 10 months ago

DomicidalDesigns commented 10 months ago

This adds the feature requested in #89.

Command Changes

Scheduler Changes

BotSettings Changes

Localization & README

Note: added new JsonSerializerSettings{ObjectCreationHandling = ObjectCreationHandling.Replace} to JsonConvert.DeserializeObject() in Program.cs because in my testing the default list of restart times was being added to the config list of times instead of being replaced. This is due to Json serializer default behavior.

egebilecen commented 10 months ago

I will try to review it today! 😊

egebilecen commented 10 months ago

Hey, I been quite busy so I haven't had chance to review it yet, sorry about it. I will get try to review the PR asap. Also, there doesn't seem to be default.json among edited files. Did you run the project after adding records to the localization dictionary? Because it should have exported new records to the said file (and git should have catched it).

DomicidalDesigns commented 10 months ago

Hey, I been quite busy so I haven't had chance to review it yet, sorry about it. I will get try to review the PR asap.

No worries, take your time :)

Also, there doesn't seem to be default.json among edited files. Did you run the project after adding records to the localization dictionary? Because it should have exported new records to the said file (and git should have catched it).

Oh, I was not running the exe in the Release folder (oops) since my zomboid server files were not there. I ran it in the Release folder now and see the default.json file showing in git and just committed it to this branch.

I moved the zomboid server files to the Release folder so that shouldn't happen in the future :)

DomicidalDesigns commented 10 months ago

Thank you for reviewing! 😃 Changes

egebilecen commented 10 months ago

Everything is looking good, perfect. Thank you!