Fix get_messages type hint (#4357)

This commit is contained in:
Darskiy
2024-04-23 16:54:41 +02:00
committed by GitHub
parent 3625bf849d
commit 3ac11e15ec
+3 -1
View File
@@ -553,7 +553,9 @@ class MessageMethods:
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
`TotalList <telethon.helpers.TotalList>` instead.