Outgoing Webhook for Gateway Events
tl;dr - Request that the API support sending outgoing webhooks for ALL Gateway events to reduce Discord + developer hosting costs.
Motivation
A lot of Discord API functionality for receiving events requires developer applications hold a persistent WebSocket connection. This is labeled as Gateway in the developer documentation. This is costly for both developers and Discord to maintain always-on connections.
Request
This feature request is for Discord to support outgoing webhooks for all Gateway Events. Similar to Interactions, this would allow developers to choose receiving events either by Gateway or outgoing webhook.
This would enable Discord developers to use event-driven, serverless solutions like AWS Lambda, Azure Functions, Google Cloud Functions/Run, etc. Many of these options charge $0 when there are no incoming events (often the case for servers that are dormant during work/school hours).
Example Use Case
My motivating use case is a bot which posts a message when someone joins a voice channel (https://github.com/OliverCardoza/domo). This functionality is not possible without using Gateway events and therefore I need to pay for cloud hosting 24/7 to maintain a WebSocket connection.
If outgoing webhooks were supported I'd be paying a fraction of the cost to only handle 50-100 events a day.
Related feedback
- Outgoing Webhooks: This feedback was scoped strictly app interactions to support Discord making outbound requests to a developer-owned endpoint. This is now supported via "Interaction Endpoint URL"
-
This would be an incredibly helpful piece of functionality for the API. Websockets are resource intensive, comparatively messy to implement, and prone to a variety of problems.
4 -
I REALLY want that feature. It would make my life so much easier. No heroku stuff, just my plain ol' LAMP-Stack Server
3 -
Example Use Case
My motivating use case is a bot which posts a message when someone joins a voice channel (https://github.com/OliverCardoza/domo/McDVOICE ). This functionality is not possible without using Gateway events and therefore I need to pay for cloud hosting 24/7 to maintain a WebSocket connection.
Websockets are resource intensive, comparatively messy to implement, and prone to a variety of problems.
3 -
+1 I'm currently dealing with trying to avoid rate limits with the restAPI for events, being able to have webhooks would completely remove the need for a polling based approach for many areas of the api when using serverless functions.
3 -
+1 would like to see events treated like interactions. This is the only thing holding me back from a serverless implementation
3 -
So disappointed to find this doesn't already exist! I'd very much like to adapt my bot to Vercel or a similar service so I don't have to keep it running on a server all the time. I need to know when the bot is mentioned, as part of its major functionality revolves around that, making a rest API impossible at the moment. We could switch to slash commands, but it would lose a major part of how the bot works.
2 -
+1.
I think it's rediculous that this is still not implemented. Any ways to currently circumvent this limitation either feels like having to DDOS discord, or wasting both their and my resource to keep an expensive websocket open. It would be lovely to be able to not only receive gateway events the same way we do interactions, but I would like to be able to inform the discord api, about which events specifically i want to receive, saving both discord and myself to yet again not waste resources. I could build a service that provides these features, but that seems like an incredibly reductive solution, to something that the discord api should just support, for both discords and the developers sake…
0 -
For future Googlers that land here: I've built this as a service until Discord makes it themselves: discordwebhooks.com. Full support for gateway events.
0
Iniciar sesión para dejar un comentario.
Comentarios
8 comentarios