-
-
Notifications
You must be signed in to change notification settings - Fork 24
feat💥: Switch error and completion function to proper events #641
Conversation
* feat 💥: delay non-raw listeners until client ready * fix: dont delay error events
…mpletion events and add/rename modal events
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add listeners to naff.ext.sentry
for the new error events.
Which ones? Functionality is the same here as on pypi, since the new error events all dispatch |
Ah, yep. Never mind then. I just misread the code when doing my initial review. |
One thing I'd like to clarify though: If I override a listener function that has |
Yes. I'm not really happy with the name, happy to take suggestions. If the flag is set, the listener will be deleted if a listener without the flag is added. The event will still trigger, but only the listener without the flag will be called. |
Let's figure out a better name for it before we merge then. |
|
I'll change it to |
# Conflicts: # naff/api/events/internal.py # naff/client/client.py # naff/models/naff/listener.py
What type of pull request is this?
Description
See the nice bullet list below.
There still is the issue that neither the
ComponentError
nor theModalError
event will be called ifctx.wait_for_component
orctx.wait_for_modal
are used. This was a problem before this however and needs some thinking how best to fix.Changes
CommandCompletion
eventComponentCompletion
eventAutocompleteCompletion
eventModalCompletion
eventCommandError
eventComponentError
eventAutocompleteError
eventModalError
eventdelete_if_overwritten
. This means they will be deleted if the user registeres their own listener for that eventModalResponse
event in favor of the newModalCompletion
eventon_command
calls in favor of the newCommandCompletion
eventon_component
calls in favor of the newComponentCompletion
eventon_autocomplete
calls in favor of the newAutocompleteCompletion
eventon_command_error
calls in favor of the newCommandError
eventon_component_error
calls in favor of the newComponentError
eventon_autocomplete_error
calls in favor of the newAutocompleteError
eventon_error
calls in favor of theError
eventChecklist
Python 3.10.x