Skip to content

Commit 16eee1d

Browse files
committed
Update docstrings
1 parent faa363f commit 16eee1d

1 file changed

Lines changed: 34 additions & 34 deletions

File tree

pyrogram/client/client.py

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def start(self):
190190
Requires no parameters.
191191
192192
Raises:
193-
:class:`pyrogram.Error`
193+
:class:`Error <pyrogram.Error>`
194194
"""
195195
if self.BOT_TOKEN_RE.match(self.session_name):
196196
self.token = self.session_name
@@ -789,7 +789,7 @@ def send(self, data: Object):
789789
The API Scheme function filled with proper arguments.
790790
791791
Raises:
792-
:class:`pyrogram.Error`
792+
:class:`Error <pyrogram.Error>`
793793
"""
794794
if self.is_started:
795795
r = self.session.send(data)
@@ -921,7 +921,7 @@ def resolve_peer(self, peer_id: int or str):
921921
:obj:`InputPeerChannel <pyrogram.api.types.InputPeerChannel>` depending on the *peer_id*.
922922
923923
Raises:
924-
:class:`pyrogram.Error`
924+
:class:`Error <pyrogram.Error>`
925925
"""
926926
if type(peer_id) is str:
927927
if peer_id in ("self", "me"):
@@ -977,7 +977,7 @@ def get_me(self):
977977
Full information about the user in form of a :obj:`UserFull <pyrogram.api.types.UserFull>` object.
978978
979979
Raises:
980-
:class:`pyrogram.Error`
980+
:class:`Error <pyrogram.Error>`
981981
"""
982982
return self.send(
983983
functions.users.GetFullUser(
@@ -1023,7 +1023,7 @@ def send_message(self,
10231023
On success, the sent Message is returned.
10241024
10251025
Raises:
1026-
:class:`pyrogram.Error`
1026+
:class:`Error <pyrogram.Error>`
10271027
"""
10281028
style = self.html if parse_mode.lower() == "html" else self.markdown
10291029

@@ -1069,7 +1069,7 @@ def forward_messages(self,
10691069
On success, the sent Message is returned.
10701070
10711071
Raises:
1072-
:class:`pyrogram.Error`
1072+
:class:`Error <pyrogram.Error>`
10731073
"""
10741074
return self.send(
10751075
functions.messages.ForwardMessages(
@@ -1138,7 +1138,7 @@ def send_photo(self,
11381138
On success, the sent Message is returned.
11391139
11401140
Raises:
1141-
:class:`pyrogram.Error`
1141+
:class:`Error <pyrogram.Error>`
11421142
"""
11431143
style = self.html if parse_mode.lower() == "html" else self.markdown
11441144
file = self.save_file(photo, progress=progress)
@@ -1228,7 +1228,7 @@ def send_audio(self,
12281228
On success, the sent Message is returned.
12291229
12301230
Raises:
1231-
:class:`pyrogram.Error`
1231+
:class:`Error <pyrogram.Error>`
12321232
"""
12331233
style = self.html if parse_mode.lower() == "html" else self.markdown
12341234
file = self.save_file(audio, progress=progress)
@@ -1312,7 +1312,7 @@ def send_document(self,
13121312
On success, the sent Message is returned.
13131313
13141314
Raises:
1315-
:class:`pyrogram.Error`
1315+
:class:`Error <pyrogram.Error>`
13161316
"""
13171317
style = self.html if parse_mode.lower() == "html" else self.markdown
13181318
file = self.save_file(document, progress=progress)
@@ -1381,7 +1381,7 @@ def send_sticker(self,
13811381
On success, the sent Message is returned.
13821382
13831383
Raises:
1384-
:class:`pyrogram.Error`
1384+
:class:`Error <pyrogram.Error>`
13851385
"""
13861386
file = self.save_file(sticker, progress=progress)
13871387

@@ -1481,7 +1481,7 @@ def send_video(self,
14811481
On success, the sent Message is returned.
14821482
14831483
Raises:
1484-
:class:`pyrogram.Error`
1484+
:class:`Error <pyrogram.Error>`
14851485
"""
14861486
style = self.html if parse_mode.lower() == "html" else self.markdown
14871487
file = self.save_file(video, progress=progress)
@@ -1572,7 +1572,7 @@ def send_voice(self,
15721572
On success, the sent Message is returned.
15731573
15741574
Raises:
1575-
:class:`pyrogram.Error`
1575+
:class:`Error <pyrogram.Error>`
15761576
"""
15771577
style = self.html if parse_mode.lower() == "html" else self.markdown
15781578
file = self.save_file(voice, progress=progress)
@@ -1652,7 +1652,7 @@ def send_video_note(self,
16521652
On success, the sent Message is returned.
16531653
16541654
Raises:
1655-
:class:`pyrogram.Error`
1655+
:class:`Error <pyrogram.Error>`
16561656
"""
16571657
file = self.save_file(video_note, progress=progress)
16581658

@@ -1816,7 +1816,7 @@ def send_location(self,
18161816
On success, the sent Message is returned.
18171817
18181818
Raises:
1819-
:class:`pyrogram.Error`
1819+
:class:`Error <pyrogram.Error>`
18201820
"""
18211821
return self.send(
18221822
functions.messages.SendMedia(
@@ -1878,7 +1878,7 @@ def send_venue(self,
18781878
On success, the sent Message is returned.
18791879
18801880
Raises:
1881-
:class:`pyrogram.Error`
1881+
:class:`Error <pyrogram.Error>`
18821882
"""
18831883
return self.send(
18841884
functions.messages.SendMedia(
@@ -1937,7 +1937,7 @@ def send_contact(self,
19371937
On success, the sent Message is returned.
19381938
19391939
Raises:
1940-
:class:`pyrogram.Error`
1940+
:class:`Error <pyrogram.Error>`
19411941
"""
19421942
return self.send(
19431943
functions.messages.SendMedia(
@@ -1976,7 +1976,7 @@ def send_chat_action(self,
19761976
Progress of the upload process.
19771977
19781978
Raises:
1979-
:class:`pyrogram.Error`
1979+
:class:`Error <pyrogram.Error>`
19801980
"""
19811981
if "Upload" in action.__name__:
19821982
action = action(progress)
@@ -2009,7 +2009,7 @@ def get_user_profile_photos(self,
20092009
Values between 1—100 are accepted. Defaults to 100.
20102010
20112011
Raises:
2012-
:class:`pyrogram.Error`
2012+
:class:`Error <pyrogram.Error>`
20132013
"""
20142014
return self.send(
20152015
functions.photos.GetUserPhotos(
@@ -2050,7 +2050,7 @@ def edit_message_text(self,
20502050
Disables link previews for links in this message.
20512051
20522052
Raises:
2053-
:class:`pyrogram.Error`
2053+
:class:`Error <pyrogram.Error>`
20542054
"""
20552055
style = self.html if parse_mode.lower() == "html" else self.markdown
20562056

@@ -2089,7 +2089,7 @@ def edit_message_caption(self,
20892089
Defaults to Markdown.
20902090
20912091
Raises:
2092-
:class:`pyrogram.Error`
2092+
:class:`Error <pyrogram.Error>`
20932093
"""
20942094
style = self.html if parse_mode.lower() == "html" else self.markdown
20952095

@@ -2129,7 +2129,7 @@ def delete_messages(self,
21292129
channels and supergroups are always revoked (i.e.: deleted for everyone).
21302130
21312131
Raises:
2132-
:class:`pyrogram.Error`
2132+
:class:`Error <pyrogram.Error>`
21332133
"""
21342134
peer = self.resolve_peer(chat_id)
21352135

@@ -2421,7 +2421,7 @@ def join_chat(self, chat_id: str):
24212421
channel/supergroup (in the format @username).
24222422
24232423
Raises:
2424-
:class:`pyrogram.Error`
2424+
:class:`Error <pyrogram.Error>`
24252425
"""
24262426
match = self.INVITE_LINK_RE.match(chat_id)
24272427

@@ -2461,7 +2461,7 @@ def leave_chat(self, chat_id: int or str, delete: bool = False):
24612461
Deletes the group chat dialog after leaving (for simple group chats, not supergroups).
24622462
24632463
Raises:
2464-
:class:`pyrogram.Error`
2464+
:class:`Error <pyrogram.Error>`
24652465
"""
24662466
peer = self.resolve_peer(chat_id)
24672467

@@ -2507,7 +2507,7 @@ def export_chat_invite_link(self, chat_id: int or str, new: bool = False):
25072507
On success, the exported invite link as string is returned.
25082508
25092509
Raises:
2510-
:class:`pyrogram.Error`
2510+
:class:`Error <pyrogram.Error>`
25112511
25122512
Note:
25132513
If the returned link is a new one it may take a while for it to be activated.
@@ -2570,7 +2570,7 @@ def enable_cloud_password(self, password: str, hint: str = "", email: str = ""):
25702570
True on success, False otherwise.
25712571
25722572
Raises:
2573-
:class:`pyrogram.Error`
2573+
:class:`Error <pyrogram.Error>`
25742574
"""
25752575
r = self.send(functions.account.GetPassword())
25762576

@@ -2609,7 +2609,7 @@ def change_cloud_password(self, current_password: str, new_password: str, new_hi
26092609
True on success, False otherwise.
26102610
26112611
Raises:
2612-
:class:`pyrogram.Error`
2612+
:class:`Error <pyrogram.Error>`
26132613
"""
26142614
r = self.send(functions.account.GetPassword())
26152615

@@ -2643,7 +2643,7 @@ def remove_cloud_password(self, password: str):
26432643
True on success, False otherwise.
26442644
26452645
Raises:
2646-
:class:`pyrogram.Error`
2646+
:class:`Error <pyrogram.Error>`
26472647
"""
26482648
r = self.send(functions.account.GetPassword())
26492649

@@ -2699,7 +2699,7 @@ def download_media(self,
26992699
On success, the absolute path of the downloaded file as string is returned, None otherwise.
27002700
27012701
Raises:
2702-
:class:`pyrogram.Error`
2702+
:class:`Error <pyrogram.Error>`
27032703
"""
27042704
if isinstance(message, (types.Message, types.Photo)):
27052705
done = Event()
@@ -2745,7 +2745,7 @@ def download_photo(self,
27452745
On success, the absolute path of the downloaded photo as string is returned, None otherwise.
27462746
27472747
Raises:
2748-
:class:`pyrogram.Error`
2748+
:class:`Error <pyrogram.Error>`
27492749
"""
27502750
if isinstance(photo, (types.UserProfilePhoto, types.ChatPhoto)):
27512751
photo = types.Photo(
@@ -2774,7 +2774,7 @@ def add_contacts(self, contacts: list):
27742774
On success, the added contacts are returned.
27752775
27762776
Raises:
2777-
:class:`pyrogram.Error`
2777+
:class:`Error <pyrogram.Error>`
27782778
"""
27792779
imported_contacts = self.send(
27802780
functions.contacts.ImportContacts(
@@ -2796,7 +2796,7 @@ def delete_contacts(self, ids: list):
27962796
True on success.
27972797
27982798
Raises:
2799-
:class:`pyrogram.Error`
2799+
:class:`Error <pyrogram.Error>`
28002800
"""
28012801
contacts = []
28022802

@@ -2856,7 +2856,7 @@ def get_inline_bot_results(self,
28562856
On Success, :obj:`BotResults <pyrogram.api.types.messages.BotResults>` is returned.
28572857
28582858
Raises:
2859-
:class:`pyrogram.Error`
2859+
:class:`Error <pyrogram.Error>`
28602860
"""
28612861
return self.send(
28622862
functions.messages.GetInlineBotResults(
@@ -2904,7 +2904,7 @@ def send_inline_bot_result(self,
29042904
On success, the sent Message is returned.
29052905
29062906
Raises:
2907-
:class:`pyrogram.Error`
2907+
:class:`Error <pyrogram.Error>`
29082908
"""
29092909
return self.send(
29102910
functions.messages.SendInlineBotResult(
@@ -2937,7 +2937,7 @@ def get_messages(self,
29372937
List of the requested messages
29382938
29392939
Raises:
2940-
:class:`pyrogram.Error`
2940+
:class:`Error <pyrogram.Error>`
29412941
"""
29422942
peer = self.resolve_peer(chat_id)
29432943
message_ids = [types.InputMessageID(i) for i in message_ids]

0 commit comments

Comments
 (0)