Event before interaction handlers are ran
There are
ChatInputCommandRun and ContextMenuCommandRun events, which are emitted before the run method. Is there anything similar for interaction handlers which is emitted after parse but before run?Solution:Jump to solution
This will be resolved with https://github.com/sapphiredev/framework/pull/641
GitHub
feat(interaction-handlers): add events for parse return states by f...
ref: https://discord.com/channels/737141877803057244/1119902447020818552/1119902447020818552
Figured I'd just emit all 3 states and let end-users figure out what they want to use where.
6 Replies
there isnt, but that is something that that could be added. What is the use case for this?
Mostly logging purposes, I only want to log when an interaction is past parse though.
I guess it would also be useful if you had a few interactions which were slower so you wanted to defer responses, you could do this all in one place.
would you expect it to emit only when
some is returned, or also when none is?
or I suppose option C is both but different events, but that can be achieved with a single if check on the end-userYup, I was thinking only for
some specifically for this one, and maybe a different event for none?
Maybe something like InteractionHandlerRun for some and InteractionHandlerDenied for none?Dumping the following here for @Answer Overflow
Solution
This will be resolved with https://github.com/sapphiredev/framework/pull/641
GitHub
feat(interaction-handlers): add events for parse return states by f...
ref: https://discord.com/channels/737141877803057244/1119902447020818552/1119902447020818552
Figured I'd just emit all 3 states and let end-users figure out what they want to use where.