JonnyPtn / zomboi

A discord bot for project zomboid multiplayer servers
50 stars 33 forks source link

Get channel from name as well as ID #3

Closed Ramshackles closed 2 years ago

Ramshackles commented 2 years ago

Hi there,

Excellent work so far, a lot better than the stock solution :)

I run my Zomboid dedicated server on Unraid so had a bit of trial and error setting this up - but finally got it working.

But I still have 1 error; "2022-03-23 09:59:59,772:WARNING:zomboi: Unable to get channel, will not be enabled"

Is this the discord channel or? I've tried with the channelname "pz" and the id but still errors out.

PS. Paths on the Zomboid container on Unraid is different than the defaults but that's quite easy to work around just altering the config.

JonnyPtn commented 2 years ago

Hey, thanks! The channel config is actually the channel ID not the channel name, which you can get either by right clicking -> copy ID if you have developer settings enabled, otherwise you can copy the channel link and get the ID from the last part of the URL.

I've clarified the config in fe62c9b but will perhaps leave this open as it should be possible to get the channel from the name

I'd be interested to know the default paths on Unraid if you can share them? If it's popular enough then it makes sense to look there without having to modify the config

Ramshackles commented 2 years ago

Well, since I guess most will install Zomboid on Unraid with a docker container the paths can be different - so I think the current solution is just fine.

Also depending on how people choose to install the python script on unraid i guess it would be impossible to foresee the paths.

I've made my own docker container with python and your script, feeding the container the paths to logs and maps but someone else might use a different approach.

I got the channel working perfectly now thanks to your response :)

JonnyPtn commented 2 years ago

It now should support either a string channel name or an integer channel ID