Skip to content

Commit c0890d8

Browse files
committed
Make get_me return the new type
1 parent 4f14dd7 commit c0890d8

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

pyrogram/client/methods/users/get_me.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,23 @@
1717
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
1818

1919
from pyrogram.api import functions, types
20-
from ...ext import BaseClient
20+
from ...ext import BaseClient, utils
2121

2222

2323
class GetMe(BaseClient):
2424
def get_me(self):
25-
"""A simple method for testing the user authorization. Requires no parameters.
25+
"""A simple method for testing your authorization. Requires no parameters.
2626
2727
Returns:
28-
Full information about the user in form of a :obj:`UserFull <pyrogram.api.types.UserFull>` object.
28+
Basic information about the user or bot in form of a :obj:`User` object
2929
3030
Raises:
3131
:class:`Error <pyrogram.Error>`
3232
"""
33-
return self.send(
34-
functions.users.GetFullUser(
35-
types.InputPeerSelf()
36-
)
33+
return utils.parse_user(
34+
self.send(
35+
functions.users.GetFullUser(
36+
types.InputPeerSelf()
37+
)
38+
).user
3739
)

0 commit comments

Comments
 (0)