-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Support yielding in interaction handler #1383
Conversation
Who is this feature for, shouldn't ppl just be using a command/component client instead of doing it raw (esp since this interface is more designed for clients to hook onto)?
Also this is kind of misleading, you could always defer and then give follow up responses just using tasks |
This is exactly what this process is doing. It provides an easier way to create a task for followups by just using the same handler |
Wouldn't it potentially be better to provide this as a helper wrapper function? Could still be implicitly |
I am not sure what you mean here. a) How would a helper function aid here? b) What would this declutter? |
If you could wrap the generator to a standard async function when being registered it should be able to abstract stuff away from the |
Considering we would have to create a task anyways and then store it in a list (because the function may be called again before the generator completed), we could end up with a bunch of objects that act as async functions that each store a list of tasks of running generators, it would be much more expensive than the 5-6 lines this adds to an existing function. I would much rather keep it the way it is atm, if we were to go this way. |
68c67ff
to
a663678
Compare
7b891eb
to
ef3bd28
Compare
Summary
Allow for proper defering in interaction handling in RESTBot
Example code:
Checklist
nox
and all the pipelines have passed.