AbsoluteVirtue / gbsr

ground branch server radar
GNU General Public License v3.0
1 stars 0 forks source link

Getting Started? #3

Open vip3rousmango opened 3 years ago

vip3rousmango commented 3 years ago

Hello!

This looks interesting, how would I get started to set this up and connected to my GROUND BRANCH server /w discord?

Would be happy to learn those leanings into a mini docs for the tool. :)

AbsoluteVirtue commented 3 years ago

Hi, you can just deploy it to your server as a python process, you can ask lt_delay at the official Discord server for GB how he did it for his server, in case you have trouble with it.

but I'll be honest, haven't updated this in a while, so I'm not even sure it works. and it didn't show players currently on the servers the last time I checked. I'm not sure if it's the library's fault or if it's a problem with the script.

I also need to make loading the results to the list asynchronous, because Steam query times are extremely long, but this would need to then be loaded asynchronously to the web page, which I don't know how to do. so, you will notice once you launch it that loading the result takes about a minute, which is extremely long.

AbsoluteVirtue commented 3 years ago

to clarify the point about Discord specifically, you need the bot.py process. launch it on your server, then add it as a bot on Discord's official site. I don't really remember how to do it, but I remember I used official documentation for that.

image

vip3rousmango commented 3 years ago

Thank you for the quick reply @AbsoluteVirtue! Okay, I'll play around with it a bit and see, Python isn't my back-end language so it's new for me I'm more of a Node/JS guy.

Looking forward if you update it! Would also be happy to link to a page on the https://unofficialgroundbranchwiki.com with a write up to help others also use it for more GB servers as the community grows.

AbsoluteVirtue commented 3 years ago

I really should complete the readme.md for this repo, so people could use it for initial setup, but don't have that much time, maybe in a month or so I'll get to it :)

AbsoluteVirtue commented 3 years ago

Thank you for the quick reply @AbsoluteVirtue! Okay, I'll play around with it a bit and see, Python isn't my back-end language so it's new for me I'm more of a Node/JS guy.

OK, to get it to build on your server you will probably need to build a virtual environment, so all the libraries this app uses are isolated from your global python installation. I used a tool called pipenv, https://docs.pipenv.org/, but you can really use anything. here's the list of required packages:

[packages] aiohttp = "" pyyaml = "" python-valve = "" "aiohttp-jinja2" = "" discord = "*"

The asterisks mean it should work OK with the latest versions. Once all of the dependencies are downloaded and unpacked where you want them, it's just a matter of running the bot.py with python 3 (I think any version should work, I used 3.8 for development).