iproVi Posted September 7, 2021 Posted September 7, 2021 Hey, I want to get some information from my server out to discord bot (to make own status channel) From where i can get the information? Need like how much players online
sparx Posted September 9, 2021 Posted September 9, 2021 I have a standalone discord bot written in .NET and it uses an API to retrieve game-server information. My server exports data to an endpoint in JSON, then I use the bot to scan for updates to the game-server API endpoint via a request. This scan can either be timed or manually triggered. The bot hits the custom endpoint, authenticates with a header bearer, and uses the information to update player count etc on the bots active game. If you are able to build your bot directly into your game-server, then that may be another route to go down.
fl1k Posted September 10, 2021 Posted September 10, 2021 1 hour ago, sparx said: I have a standalone discord bot written in .NET and it uses an API to retrieve game-server information. My server exports data to an endpoint in JSON, then I use the bot to scan for updates to the game-server API endpoint via a request. This scan can either be timed or manually triggered. The bot hits the custom endpoint, authenticates with a header bearer, and uses the information to update player count etc on the bots active game. If you are able to build your bot directly into your game-server, then that may be another route to go down. why not jost use Discord.NET inside your server project....
sparx Posted September 10, 2021 Posted September 10, 2021 (edited) 1 hour ago, fl1k said: why not jost use Discord.NET inside your server project.... Good question. I prefer to follow a micro-service architecture for most things I build. Practice loose coupling everywhere to minimize one component being too reliant on another. To be fair, if the bot is just completing tasks for the server, and that's it (posting to discord channels with logs, relaying messages etc) then it'll be fine to couple it to a server. Personal preference I guess Edited September 10, 2021 by sparx
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now