-
Notifications
You must be signed in to change notification settings - Fork 184
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
feat: pass event object based on listeners signature #1367
feat: pass event object based on listeners signature #1367
Conversation
Purely because I'm certain we are going to get people saying "hOw Do I gEt ThE EvEnT" can you make the listener throw a warning if an event that would normally have a Param (ie any apart from startup and ready) don't on instantiation? |
Also, would it be worth moving the inspect call to the listeners instantiation too, as inspect is very expensive, and this is a high traffic part of the lib |
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.
That's a lot nicer looking 😄
Pull Request Type
Description & changes
Event object is now passed (or not) based on whether there are any parameters in listener
Test Scenarios
Tested on my bot and with test script - both as standalone function listeners and as extension methods
Python Compatibility
3.10.x
3.11.x
Checklist
pre-commit
code linter over all edited files