Make filters combinable

This commit is contained in:
Lonami Exo
2023-11-02 01:30:40 +01:00
parent 2def0a169c
commit 2992a8e212
7 changed files with 126 additions and 26 deletions

View File

@@ -345,6 +345,7 @@ There is no longer nested ``class Event`` inside them either.
Instead, the event type itself is what the handler will actually be called with.
Because filters are separate, there is no longer a need for v1 ``@events.register`` either.
It also means you can combine filters with ``&``, ``|`` and ``~``.
Filters are now normal functions that work with any event.
Of course, this doesn't mean all filters make sense for all events.