Skip to content

Commit

Permalink
Fix add_event_listener not appropriately adding raw listeners
Browse files Browse the repository at this point in the history
  • Loading branch information
nexy7574 committed Dec 12, 2024
1 parent ce52420 commit 57b1784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/niobot/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ def add_event_listener(self, event_type: typing.Union[str, nio.Event, Type[nio.E
self._events.setdefault(event_type, [])
self._events[event_type].append(func)

if isinstance(event_type, nio.Event):
if not isinstance(event_type, str):

@functools.wraps(func)
async def event_safety_wrapper(*args):
Expand Down

0 comments on commit 57b1784

Please sign in to comment.