mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2024-12-01 22:03:46 +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:
|
if event is None:
|
||||||
for param in inspect.signature(callback).parameters.values():
|
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
|
break # only check the first parameter
|
||||||
|
|
||||||
if event is None:
|
if event is None:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user