mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Make get_me return the new type
This commit is contained in:
parent
4f14dd7abe
commit
c0890d8cdb
1 changed files with 9 additions and 7 deletions
|
|
@ -17,21 +17,23 @@
|
||||||
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
# along with Pyrogram. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
from pyrogram.api import functions, types
|
from pyrogram.api import functions, types
|
||||||
from ...ext import BaseClient
|
from ...ext import BaseClient, utils
|
||||||
|
|
||||||
|
|
||||||
class GetMe(BaseClient):
|
class GetMe(BaseClient):
|
||||||
def get_me(self):
|
def get_me(self):
|
||||||
"""A simple method for testing the user authorization. Requires no parameters.
|
"""A simple method for testing your authorization. Requires no parameters.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
Full information about the user in form of a :obj:`UserFull <pyrogram.api.types.UserFull>` object.
|
Basic information about the user or bot in form of a :obj:`User` object
|
||||||
|
|
||||||
Raises:
|
Raises:
|
||||||
:class:`Error <pyrogram.Error>`
|
:class:`Error <pyrogram.Error>`
|
||||||
"""
|
"""
|
||||||
return self.send(
|
return utils.parse_user(
|
||||||
functions.users.GetFullUser(
|
self.send(
|
||||||
types.InputPeerSelf()
|
functions.users.GetFullUser(
|
||||||
)
|
types.InputPeerSelf()
|
||||||
|
)
|
||||||
|
).user
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue