Include type of input peer in unknown entity error

This commit is contained in:
Tulir Asokan 2021-03-14 01:07:47 +02:00
parent 6cf6b156fc
commit de6a61193e

View File

@ -459,10 +459,10 @@ class UserMethods:
pass pass
raise ValueError( raise ValueError(
'Could not find the input entity for {!s}. Please read https://' 'Could not find the input entity for {} ({}). Please read https://'
'docs.telethon.dev/en/latest/concepts/entities.html to' 'docs.telethon.dev/en/latest/concepts/entities.html to'
' find out more details.' ' find out more details.'
.format(peer) .format(peer, type(peer).__name__)
) )
async def _get_peer(self: 'TelegramClient', peer: 'hints.EntityLike'): async def _get_peer(self: 'TelegramClient', peer: 'hints.EntityLike'):