mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-28 00:56:19 +00:00
Add disable_notification parameter
This commit is contained in:
parent
fb4ae4b17e
commit
08d6912637
@ -340,13 +340,12 @@ class Client:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def send_message(
|
def send_message(self,
|
||||||
self,
|
|
||||||
chat_id: int or str,
|
chat_id: int or str,
|
||||||
text: str,
|
text: str,
|
||||||
disable_web_page_preview: bool = None,
|
disable_web_page_preview: bool = None,
|
||||||
reply_to_msg_id: int = None,
|
disable_notification: bool = None,
|
||||||
):
|
reply_to_msg_id: int = None):
|
||||||
# TODO: Resolve usernames when they don't exists yet (contacts.ResolveUsername)
|
# TODO: Resolve usernames when they don't exists yet (contacts.ResolveUsername)
|
||||||
|
|
||||||
if chat_id in ("self", "me"):
|
if chat_id in ("self", "me"):
|
||||||
@ -389,7 +388,8 @@ class Client:
|
|||||||
peer=input_peer,
|
peer=input_peer,
|
||||||
message=text,
|
message=text,
|
||||||
random_id=self.rnd_id(),
|
random_id=self.rnd_id(),
|
||||||
no_webpage=disable_web_page_preview,
|
no_webpage=disable_web_page_preview or None,
|
||||||
|
silent=disable_notification or None,
|
||||||
reply_to_msg_id=reply_to_msg_id,
|
reply_to_msg_id=reply_to_msg_id,
|
||||||
entities=entities
|
entities=entities
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user