Open DarkAtra opened 2 months ago
waiting for the next update to drop as it will likely break all mods again... i'll look into implementing this afterwards
For "Game to Discord Chat" see: https://github.com/DarkAtra/v-rising-discord-bot-companion/pull/24
According to https://discord.com/safety/using-webhooks-and-embeds webhooks are limited to posting 30 messages a minute.
A webhook can only send 30 messages per minute
This might be an issue... maybe a more general solution for bi-directional communication would be preferred here. Having a bi-directional communication channel would allow the bot companion to push data to the bot and thus reduce the amount of requests the bot has to make while also increasing the speed at which changes are reflected in discord. This would probably also benefit the activity feed, kill feed and, in the future, the leaderboard features.
I think i'll invest some time into researching if the v rising server is capable of sending Server-Sent Events. Ktor will likely support SSE in the next release as well: https://ktor.io/docs/3.0.0-beta-1/sse-client.html
It would be great if chat messages from within the game are visible on Discord and messages in a specific discord channel are also visible in game. This is how it could be implemented:
Message from Game to Discord:
bot-companion
and send them to discord via WebhooksMessages from Discord to Game:
bot-companion
that allows the discord bot to post messages to the chat. Every message in a given channel could then be posted to that endpoint so that it's visible in game.Might be useful to implement some form of rate limiting here.