mirror of
https://github.com/LonamiWebs/Telethon.git
synced 2025-08-09 13:29:47 +00:00
Better autocast to InputPeerDialog and documentation
This commit is contained in:
@@ -192,7 +192,8 @@ def _get_description(arg):
|
||||
'<code>None</code> and can be omitted.')
|
||||
otherwise = True
|
||||
|
||||
if arg.type in {'InputPeer', 'InputUser', 'InputChannel'}:
|
||||
if arg.type in {'InputPeer', 'InputUser', 'InputChannel',
|
||||
'InputNotifyPeer', 'InputDialogPeer'}:
|
||||
desc.append(
|
||||
'Anything entity-like will work if the library can find its '
|
||||
'<code>Input</code> version (e.g., usernames, <code>Peer</code>, '
|
||||
|
@@ -20,9 +20,8 @@ AUTO_CASTS = {
|
||||
'utils.get_input_channel(await client.get_input_entity({}))',
|
||||
'InputUser':
|
||||
'utils.get_input_user(await client.get_input_entity({}))',
|
||||
'InputDialogPeer':
|
||||
'utils.get_input_dialog(await client.get_input_entity({}))',
|
||||
|
||||
'InputDialogPeer': 'await client._get_input_dialog({})',
|
||||
'InputNotifyPeer': 'await client._get_input_notify({})',
|
||||
'InputMedia': 'utils.get_input_media({})',
|
||||
'InputPhoto': 'utils.get_input_photo({})',
|
||||
|
Reference in New Issue
Block a user