danewfie / ValheimCoreDiscordBot

Valheim Discord Bot using Discord.Net and .Net Core
4 stars 2 forks source link

Request for feature? #3

Open FriGiN opened 3 years ago

FriGiN commented 3 years ago

It took me a good long time to get this code compiled, i'm just not code savvy.

Here is my issue: I use NonSuckingServiceManager to control the server as a service. I cant get this bot to shutdown or restart it because of this. I literally would just like to modify the start, restart, status, and stop commands to be:

(in all the below cases "nssm" is the nssm.exe defined in my path to call upon the service host)

so the syntax is pretty clear below its: 'nssm.exe' 'operation' 'service name'

Start - nssm start valheim
Stop - nssm stop valheim
Restart - nssm restart valheim
Status - nssm status valheim

Below is commandline output of the 4 tasks.

D:\Jeremy\servers\steamapps\common\Valheim dedicated server>nssm stop valheim
valheim: STOP: The operation completed successfully.

D:\Jeremy\servers\steamapps\common\Valheim dedicated server>nssm start valheim
valheim: START: The operation completed successfully.

D:\Jeremy\servers\steamapps\common\Valheim dedicated server>nssm restart valheim
valheim: STOP: The operation completed successfully.
valheim: START: The operation completed successfully.

D:\Jeremy\servers\steamapps\common\Valheim dedicated server>nssm status valheim
SERVICE_RUNNING

I'm on a fixed income but i get paid in like a week think i could persuade you to help with my conundrum, add some functionality to your bot, and maybe get a starbucks outta it?

danewfie commented 3 years ago

The main purpose of this bot was to allow discord to send reactions to events happening in game which might be slightly different than what you are wanting to do.

I am not familiar with nssm so would have to try it out for myself to make a test.

Does nssm provide valheim service outputs as its running?

If you don't care about any of the server outputs then its really simple operations for your use case to just attach those commands to discord commands.

Am I understanding your request?

FriGiN commented 3 years ago

NSSM doesnt have any defined services. the service literally is just like running the .bat file for startup but hiding the window behind a service so it  can be running and not interfere with the desktop at all.

On 03/28/21 13:19:06, danewfie @.***> wrote: The main purpose of this bot was to allow discord to send reactions to events happening in game which might be slightly different than what you are wanting to do. I am not familiar with nssm so would have to try it out for myself to make a test. Does nssm provide valheim service outputs as its running? If you don't care about any of the server outputs then its really simple operations for your use case to just attach those commands to discord commands. Am I understanding your request? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub [https://github.com/danewfie/ValheimCoreDiscordBot/issues/3#issuecomment-808936343], or unsubscribe [https://github.com/notifications/unsubscribe-auth/AO5LOUUKIZFYHIXSKVZCHADTF5XJVANCNFSM4Z4RUUXQ].