7-days-to-die-server-manager icon indicating copy to clipboard operation
7-days-to-die-server-manager copied to clipboard

Discord status to show online players

Open rjclarkewp007 opened this issue 3 years ago • 1 comments

Add a custom status option to the Discord bot to display the current online players on the server.

rjclarkewp007 avatar May 18 '21 11:05 rjclarkewp007

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

niekcandaele avatar May 18 '21 11:05 niekcandaele