mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Fix calls to remove_event_handler
This commit is contained in:
parent
d1dba60278
commit
48bd061562
|
@ -2877,6 +2877,7 @@ class TelegramClient:
|
||||||
self: 'TelegramClient',
|
self: 'TelegramClient',
|
||||||
callback: updates.Callback = None,
|
callback: updates.Callback = None,
|
||||||
event: EventBuilder = None,
|
event: EventBuilder = None,
|
||||||
|
*,
|
||||||
priority=None,
|
priority=None,
|
||||||
) -> int:
|
) -> int:
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -97,9 +97,10 @@ def add_event_handler(
|
||||||
|
|
||||||
def remove_event_handler(
|
def remove_event_handler(
|
||||||
self: 'TelegramClient',
|
self: 'TelegramClient',
|
||||||
callback,
|
callback=None,
|
||||||
event,
|
event=None,
|
||||||
priority,
|
*,
|
||||||
|
priority=None,
|
||||||
):
|
):
|
||||||
if callback is None and event is None and priority is 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')
|
raise ValueError('must specify at least one of callback, event or priority')
|
||||||
|
|
Loading…
Reference in New Issue
Block a user