-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
The current event handling is based on a Chain of Responsibility. While it works, it introduces unnecessary overhead when the number of handlers grows. Every event must pass through multiple handlers until it reaches the correct one, resulting in O(n) traversal per event.
Since Discord events are strongly typed and usually handled by specific handlers, an Event Dispatcher pattern would be more appropriate. By using a dictionary keyed by event type, we can perform O(1) lookups and directly execute the relevant handlers.
This refactor will improve performance, scalability, and maintainability of the event processing pipeline.
Reactions are currently unavailable