mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Fix add_handler auto-type detection
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user