Remove input_peer parameter from get_me

This commit is contained in:
Lonami Exo
2022-01-26 11:03:50 +01:00
parent 7778e54467
commit d426099bf5
5 changed files with 9 additions and 17 deletions

View File

@@ -3274,19 +3274,13 @@ class TelegramClient:
"""
@forward_call(users.get_me)
async def get_me(self: 'TelegramClient', input_peer: bool = False) \
-> 'typing.Union[_tl.User, _tl.InputPeerUser]':
async def get_me(self: 'TelegramClient') \
-> '_tl.User':
"""
Gets "me", the current :tl:`User` who is logged in.
If the user has not logged in yet, this method returns `None`.
Arguments
input_peer (`bool`, optional):
Whether to return the :tl:`InputPeerUser` version or the normal
:tl:`User`. This can be useful if you just need to know the ID
of yourself.
Returns
Your own :tl:`User`.
@@ -3434,9 +3428,6 @@ class TelegramClient:
:tl:`InputPeerUser`, :tl:`InputPeerChat` or :tl:`InputPeerChannel`
or :tl:`InputPeerSelf` if the parameter is ``'me'`` or ``'self'``.
If you need to get the ID of yourself, you should use
`get_me` with ``input_peer=True``) instead.
Example
.. code-block:: python