Fergun.Interactive icon indicating copy to clipboard operation
Fergun.Interactive copied to clipboard

Add REST-based interaction handling

Open d4n3436 opened this issue 2 years ago • 1 comments

~Waiting for a new Discord.Net Labs release to work on it.~

Related: https://github.com/Discord-Net-Labs/Discord.Net-Labs/commit/32f5661a94d485c7e570043ea81ece0afb4c0441

d4n3436 avatar Nov 19 '21 03:11 d4n3436

Any update on this?

@TheStachelfisch you deleted your comment but I will answer it anyway:

REST/HTTP interactions are complex, supporting it implies changing the methods and internal callbacks to support IDiscordInteraction and IComponentInteraction, plus a new delegate for responding REST interactions has to be added.

I've finished adapting the library to support REST interactions, but I have not tested it yet. I need some feedback/opinions on the way of handling the REST interactions. Currently, the lib uses a callback from the config (RestResponseCallback), which is called when responding/deferring incoming interactions from InteractiveService.HandleRestInteractionAsync, but I'm not sure if this design is the best for this case.

REST interactions branch: https://github.com/d4n3436/Fergun.Interactive/tree/rest-interactions

Feel free to leave any feedback here.

d4n3436 avatar Dec 24 '21 01:12 d4n3436