nextcore
nextcore copied to clipboard
Basic endpoint implementation
This is not called webhook because of potential confusion between this and the channel webhooks.
This is for anything that receives HTTP requests originating from Discord's servers.
My structure for this is going to be to
- Create a adapter per web-framework that sets up a app and HTTP paths, and passes the processed data from the request to the main class
- A main class, unsure of a name that takes the data from the adapters and dispatches it and does logic stuff.
Unsure of how the different features like interactions and oauth are going to fit into this as there is quite a lot of features to cram into one class, however I don't know any better way to structure it.
TODO:
- [ ] Make docs readable
- [ ] Interactions
- [ ] OAuth
- [ ] Try to extend the compatible versions of the packages added
- [x] Tests for new Dispatcher feature
- [ ] Tests for all endpoint stuff
- [ ] Add example usages to the docs