Add ParseMode module · stack-queue/pyrogram@84ae464 · GitHub
Skip to content

Commit 84ae464

Browse files
committed
Add ParseMode module
1 parent e7cbff8 commit 84ae464

4 files changed

Lines changed: 55 additions & 16 deletions

File tree

pyrogram/__init__.py

Lines changed: 1 addition & 0 deletions

pyrogram/client/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@
1818

1919
from .chat_action import ChatAction
2020
from .client import Client
21+
from .parse_mode import ParseMode

pyrogram/client/client.py

Lines changed: 24 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,9 @@ def send_message(self,
488488
Text of the message to be sent.
489489
490490
parse_mode (:obj:`str`):
491-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
492-
inline URLs in your message. Defaults to "Markdown".
491+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
492+
to show bold, italic, fixed-width text or inline URLs in your message.
493+
Defaults to MARKDOWN.
493494
494495
disable_web_page_preview (:obj:`bool`, optional):
495496
Disables link previews for links in this message.
@@ -585,8 +586,9 @@ def send_photo(self,
585586
Photo caption, 0-200 characters.
586587
587588
parse_mode (:obj:`str`):
588-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
589-
inline URLs in your caption. Defaults to "Markdown".
589+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
590+
to show bold, italic, fixed-width text or inline URLs in your caption.
591+
Defaults to MARKDOWN.
590592
591593
ttl_seconds (:obj:`int`, optional):
592594
Self-Destruct Timer.
@@ -657,8 +659,9 @@ def send_audio(self,
657659
Audio caption, 0-200 characters.
658660
659661
parse_mode (:obj:`str`):
660-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
661-
inline URLs in your caption. Defaults to "Markdown".
662+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
663+
to show bold, italic, fixed-width text or inline URLs in your caption.
664+
Defaults to MARKDOWN.
662665
663666
duration (:obj:`int`, optional):
664667
Duration of the audio in seconds.
@@ -736,8 +739,9 @@ def send_document(self,
736739
Document caption, 0-200 characters.
737740
738741
parse_mode (:obj:`str`):
739-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
740-
inline URLs in your caption. Defaults to "Markdown".
742+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
743+
to show bold, italic, fixed-width text or inline URLs in your caption.
744+
Defaults to MARKDOWN.
741745
742746
disable_notification (:obj:`bool`, optional):
743747
Sends the message silently.
@@ -804,8 +808,9 @@ def send_video(self,
804808
Video caption, 0-200 characters.
805809
806810
parse_mode (:obj:`str`):
807-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
808-
inline URLs in your caption. Defaults to "Markdown".
811+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
812+
to show bold, italic, fixed-width text or inline URLs in your caption.
813+
Defaults to MARKDOWN.
809814
810815
duration (:obj:`int`, optional):
811816
Duration of sent video in seconds.
@@ -883,8 +888,9 @@ def send_voice(self,
883888
Voice message caption, 0-200 characters.
884889
885890
parse_mode (:obj:`str`):
886-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
887-
inline URLs in your caption. Defaults to "Markdown".
891+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
892+
to show bold, italic, fixed-width text or inline URLs in your caption.
893+
Defaults to MARKDOWN.
888894
889895
duration (:obj:`int`, optional):
890896
Duration of the voice message in seconds.
@@ -1247,8 +1253,9 @@ def edit_message_text(self,
12471253
New text of the message.
12481254
12491255
parse_mode (:obj:`str`):
1250-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
1251-
inline URLs in your message. Defaults to "Markdown".
1256+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
1257+
to show bold, italic, fixed-width text or inline URLs in your message.
1258+
Defaults to MARKDOWN.
12521259
12531260
disable_web_page_preview (:obj:`bool`, optional):
12541261
Disables link previews for links in this message.
@@ -1287,8 +1294,9 @@ def edit_message_caption(self,
12871294
New caption of the message.
12881295
12891296
parse_mode (:obj:`str`):
1290-
Use "Markdown" or "HTML" if you want Telegram apps to show bold, italic, fixed-width text or
1291-
inline URLs in your caption. Defaults to "Markdown".
1297+
Use :obj:`pyrogram.ParseMode.MARKDOWN` or :obj:`pyrogram.ParseMode.HTML` if you want Telegram apps
1298+
to show bold, italic, fixed-width text or inline URLs in your caption.
1299+
Defaults to MARKDOWN.
12921300
12931301
Raises:
12941302
:class:`pyrogram.Error`

pyrogram/client/parse_mode.py

Lines changed: 29 additions & 0 deletions

0 commit comments

Comments
 (0)