mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-11-26 03:13:45 +03:00
Fix add_handler auto-type detection
This commit is contained in:
parent
cb628f3cce
commit
46ba9696aa
|
@ -56,7 +56,7 @@ def add_event_handler(
|
|||
|
||||
if event is None:
|
||||
for param in inspect.signature(callback).parameters.values():
|
||||
event = param.annotation
|
||||
event = None if param.annotation is inspect.Signature.empty else param.annotation
|
||||
break # only check the first parameter
|
||||
|
||||
if event is None:
|
||||
|
|
Loading…
Reference in New Issue
Block a user