mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 15:34:52 +00:00
Document get_chat
This commit is contained in:
parent
d2713cb234
commit
0367c765e2
1 changed files with 9 additions and 1 deletions
|
|
@ -22,7 +22,15 @@ from ...ext import BaseClient, utils
|
||||||
|
|
||||||
class GetChat(BaseClient):
|
class GetChat(BaseClient):
|
||||||
def get_chat(self, chat_id: int or str):
|
def get_chat(self, chat_id: int or str):
|
||||||
# TODO: Add docstrings
|
"""Use this method to get up to date information about the chat (current name of the user for
|
||||||
|
one-on-one conversations, current username of a user, group or channel, etc.)
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
On success, a :obj:`Chat <pyrogram.Chat>` object is returned.
|
||||||
|
|
||||||
|
Raises:
|
||||||
|
:class:`Error <pyrogram.Error>`
|
||||||
|
"""
|
||||||
peer = self.resolve_peer(chat_id)
|
peer = self.resolve_peer(chat_id)
|
||||||
|
|
||||||
if isinstance(peer, types.InputPeerChannel):
|
if isinstance(peer, types.InputPeerChannel):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue