[Dev Log] Discord Bot For Game Server Generation

Thought I’d create a build log for my open-source discord chat bot (GitHub - tomhobson/Sergen: A discord chat bot and docker controller to create game servers easily.).

It’s very alpha at the moment but I’d like to see if people are interested.

It’s a c# project (but .net core so it works on linux!), it’s pretty simple, at the moment Factorio and Minecraft are setup, Terraria and KSP Dark MP are in progress.

I’d like to eventually support main-secondary setups so that the original bot can just be invited. But at the moment you’ll need to setup your own bot.

In the meantime you can try it out on this server: https://discord.gg/pcuJyb

Please let me know if you’re interested and if there’s any major issues I need to address.

3 Likes

Changes: 20/10/20 <- cool date

  • Improving logging tonight and fixing minor bugs.
  • Had very little exception handling in before so added that too.
  • Added the option to use both ‘-start’ and ‘-run’ as I kept messing it up.

Had some ideas of how to host steam managed servers tonight, but the username and password seems like a huge pain to have to do for each setup. Wonder if there’s a better way…

You should make this part of the #devember2020 thread movement here.

1 Like

Thanks! Done.

I’m going to spend some time tonight to setup a Sergen channel, so people can have a play with the bot without having to do the complex install as well.

Also I’ve reread the readme.md and it doesn’t go through setting up a bot, inviting it to a server adding the token to config. Which is a task within itself.

I’d suggest changing the title to “[Devember 2020] Easy Discord Bot Server Generation” and switching the tags to software development

might get you more visibility

good luck

1 Like

Thanks, Updated.

I’ve edited the original post to include an invite link for a discord server with sergen in.

Edited the docs too to contain docs on creating your very own bot.

1 Like

Feeling quite defeated tonight. I managed to solve my initial issue and got tty binding to Terraria so the container would start and run.

Problem is that Terraria has world creation options that need to be fufilled, I had a cup of tea and a think about how it could/should work.

I’ve got a few options:

  • To get the ball rolling I could create a “middle of the road” setup with basically default settings (but that wouldn’t be software engineering would it)
  • Build an interactive configuration management system that enables users to select custom options for their world. This would require a bit of jiggery pokery with my game servers (they’d each need to be their own class) But this enables much more functionality in future. (Think Minecraft Skyblock or spleef).
  • Can do the first method but create an ftp, so if power users want they can manage their server remotely a bit easier.

I think you can tell which one I’m planning on doing. Might have an experiment tomorrow…

Hey @wendell just watched https://youtu.be/qOthrvBuFcs?t=349

All this code is my own… None is cloned from another repo.
If you want me to talk you through the code then I can.

its a very cool project,

for the cloning thing from other projects, that comment was more for some of the other projects that maybe started as a fork of something else but didn’t add a ton.

here you setup to create a build log for the work you’d done previously, so not totally aligned with the contest, but I still learned a lot about discord bots and it’s pretty cool

good work :slight_smile:

and you will probably get to pick from some of the prizes way on down the list too so kudos

Cool, just sounded like you were saying I didn’t actually write any of it…

Been working for a startup firm so didn’t have a tonne of time to work on this anyway. But thanks for the mention and we’ll see if I manage to get some packing material :smile:

Been a while, Works still insane…

But I’ve added Valheim to the supported servers list, Played for a few hours last night and had no issues.

Gonna look into whitelists for the bot as there’s a few people in my discord server that I don’t trust enough to stop the server as a joke.

Added an allowlist now. Saw a comment on discord bot reddit that every bot should have an allow list.

kinda guilted myself into it.

Didn’t wanna get too much into user management so only server owners can manage allowlists at the moment.

It works using the discord @ command.

Problem is, some users in my server just don’t seem to be gettable by the api, seems a bit strange… Might be a PR to the discord.net api…

Done the basic support for steam servers tonight.
I’m gonna do the documentation sometime soon and setup some basic servers. I’m thinking a csgo or arma 3.

At the moment I’m doing a replace within {$STEAM_USER}/{$STEAM_PASS} environment variables for the containers, codes a bit messy atm but it should be suuuper easy to add any server I need from now on.

I’ve also made some well needed usability improvements, stopping servers sometimes takes a while but there’s no instant feedback, so that’s in there now. ALso I’ve swapped status for state on the docker container, as it makes more sense.

I’d like to add a way to see the load on the server, but I’m gonna have to think about that more.

Long time since last post. I’ve basically been maintaining this and keeping it running.

Migrating through the dotnet versions and having to update the server it’s running along. Alongside peoples negative opinions about microsoft and therefore dotnet. I’m feeling like I would enjoy rewriting it in go and making it a nice portable binary that’s super easy to just drop and go.

I also think that the setup experience could be waaaay easier. I could probably just link people to the right place and build up the configuration files myself via a nicer setup system.

It is a really useful system so seems a shame to keep the barrier for entry high on the setup.