mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-06 15:14:52 +00:00
Protect client by renaming the property to _client
This commit is contained in:
parent
7752aef338
commit
745049bda3
2 changed files with 6 additions and 6 deletions
|
|
@ -583,10 +583,10 @@ def parse_messages(
|
||||||
)
|
)
|
||||||
|
|
||||||
if m.text:
|
if m.text:
|
||||||
m.text.init(m.client, m.entities or [])
|
m.text.init(m._client, m.entities or [])
|
||||||
|
|
||||||
if m.caption:
|
if m.caption:
|
||||||
m.caption.init(m.client, m.caption_entities or [])
|
m.caption.init(m._client, m.caption_entities or [])
|
||||||
|
|
||||||
if message.reply_to_msg_id and replies:
|
if message.reply_to_msg_id and replies:
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
|
|
@ -260,7 +260,7 @@ class Message(Object):
|
||||||
reply_markup=None,
|
reply_markup=None,
|
||||||
):
|
):
|
||||||
self.message_id = message_id # int
|
self.message_id = message_id # int
|
||||||
self.client = client
|
self._client = client
|
||||||
self.date = date # int
|
self.date = date # int
|
||||||
self.chat = chat # Chat
|
self.chat = chat # Chat
|
||||||
self.from_user = from_user # flags.0?User
|
self.from_user = from_user # flags.0?User
|
||||||
|
|
@ -373,7 +373,7 @@ class Message(Object):
|
||||||
if reply_to_message_id is None and quote:
|
if reply_to_message_id is None and quote:
|
||||||
reply_to_message_id = self.message_id
|
reply_to_message_id = self.message_id
|
||||||
|
|
||||||
return self.client.send_message(
|
return self._client.send_message(
|
||||||
chat_id=self.chat.id,
|
chat_id=self.chat.id,
|
||||||
text=text,
|
text=text,
|
||||||
parse_mode=parse_mode,
|
parse_mode=parse_mode,
|
||||||
|
|
@ -418,7 +418,7 @@ class Message(Object):
|
||||||
Raises:
|
Raises:
|
||||||
:class:`Error <pyrogram.Error>`
|
:class:`Error <pyrogram.Error>`
|
||||||
"""
|
"""
|
||||||
return self.client.forward_messages(
|
return self._client.forward_messages(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
from_chat_id=self.chat.id,
|
from_chat_id=self.chat.id,
|
||||||
message_ids=self.message_id,
|
message_ids=self.message_id,
|
||||||
|
|
@ -453,7 +453,7 @@ class Message(Object):
|
||||||
Raises:
|
Raises:
|
||||||
:class:`Error <pyrogram.Error>`
|
:class:`Error <pyrogram.Error>`
|
||||||
"""
|
"""
|
||||||
self.client.delete_messages(
|
self._client.delete_messages(
|
||||||
chat_id=self.chat.id,
|
chat_id=self.chat.id,
|
||||||
message_ids=self.message_id,
|
message_ids=self.message_id,
|
||||||
revoke=revoke
|
revoke=revoke
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue