7-days-to-die-server-manager
7-days-to-die-server-manager copied to clipboard
Discord status to show online players
Add a custom status option to the Discord bot to display the current online players on the server.
So filling this out with some additional info:
- This should be a configurable option. For public instances, rotating the Discord bot status is not feasible. The Discord bot status is global, so having this info rotate for hundreds of servers is just a no-go. For self-hosted instances, this is a nice feature
There's already some logic for rotating info here: https://github.com/CatalysmsServerManager/7-days-to-die-server-manager/blob/master/api/hooks/discordBot/index.js#L101-L135
First thoughts would be to have an if statement, if it's a selfhosted instance => Get player data continously and update status if not => do the logic that's there now.
You can use the env var CSMM_PRIVATE_INSTANCE for that if check probably. It doesn't 100% mean it's a self hosted instance, but should be close enough