Fix get_messages type hint

This commit is contained in:
Serj Berbeha 2024-04-23 03:47:01 +03:00
parent 3625bf849d
commit 2fd860c78b

View File

@ -553,7 +553,9 @@ class MessageMethods:
scheduled=scheduled scheduled=scheduled
) )
async def get_messages(self: 'TelegramClient', *args, **kwargs) -> 'hints.TotalList': async def get_messages(
self: 'TelegramClient', *args, **kwargs
) -> typing.Union['hints.TotalList', typing.Optional['types.Message']]:
""" """
Same as `iter_messages()`, but returns a Same as `iter_messages()`, but returns a
`TotalList <telethon.helpers.TotalList>` instead. `TotalList <telethon.helpers.TotalList>` instead.