Fix calls to remove_event_handler

This commit is contained in:
Lonami Exo 2022-02-24 10:59:52 +01:00
parent d1dba60278
commit 48bd061562
2 changed files with 5 additions and 3 deletions

View File

@ -2877,6 +2877,7 @@ class TelegramClient:
self: 'TelegramClient',
callback: updates.Callback = None,
event: EventBuilder = None,
*,
priority=None,
) -> int:
"""

View File

@ -97,9 +97,10 @@ def add_event_handler(
def remove_event_handler(
self: 'TelegramClient',
callback,
event,
priority,
callback=None,
event=None,
*,
priority=None,
):
if callback is None and event is None and priority is None:
raise ValueError('must specify at least one of callback, event or priority')