-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post to webhook when new map is fully published #607
Comments
idk if these are something that would just be available in our discord server or if people could use them in their own servers, but if they can then it could be cool to consider some sort of separate event for WIP maps being added/updated/something, making it easier for people to get slammed in the face in discord when something needs testing. not sure at all about the mechanics behind webhooks and how cumbersome that may be to add, as people will probably only actually want a few gamemodes or events to get posted in their discord channels. if people were able to select for example: I want the following map notifications:
For the following gamemodes:
then that'd be sick |
So just doing some quick research on Webhooks as while I've used them I haven't developed them. Looks like we'd basically need to collect a bunch of endpoint URL's that we'd want to post to when a map is complete/updated. And we would need to set it up in a way where those Webhooks are tied to a user account too.
Here is a super simple implementation using NestJS. https://www.fullstacklabs.co/blog/how-to-implement-webhooks-using-nestjs. Again we'd need to update our DB schema somewhere to include a webhooks table/column and draw up a whole UI/UX flow for giving us a webhook endpoint.
Here's a list of some of the things that bounce around my mind when thinking about this feature:
- Do we store webhooks against a user?
- How many webhooks can each user have?
- How long would it take to post to 1000s if not 100,000s of webhooks?
- How do we store notification options? Against the user or the webhook itself? (I'd prefer the latter)
- How can we make sure that this posting doesn't affect API performance when running?
- Should we care about webhook's response, if so should we warn users that its not 200ing and after multiple missed days delete the record? (Or at least mark as inactive so we don't post to it)
But I personally think that this should be handled by the bot to begin with. Then when we've given it more thought and have a bit more of an existing method of notifying users when maps change status, then this should be looked at being implemented.
|
If it's going to be in people's servers, it'll be a bot integration for sure. This issue was made with just the official discord in mind. We could even make the official channel we use an announcement channel that people can follow and put in their servers too. |
Yeah my thought exactly, this feature does allow for more collaborative development (e.g. users would be able to make their own dumb downed MMod bot) but honestly I think this should be put as a super low priority and this should be handled by the discord bot first, then maybe this later down the line |
sounds good to me. we use a webhook ONLY for what's outlined in the above issue ONLY for a channel in our discord server, then live posting of things like wrs/new maps/wip maps in everyone else's server goes to the new JS bot. |
This is really complex, we'll discuss more soon |
The backend will have an env var for the webhook to post to. It will be an announcement channel, and can ping a specific role that users can opt into in the server to get notified. Other servers can "follow" the channel to get it in their servers, this will not be in a Discord bot. |
When a new map is fully published (admin approved and clicked green check), we should post to (a) webhook(s) announcing such news. This will allow us to be flexible with our game's announcements on Discord.
The text was updated successfully, but these errors were encountered: