mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-07 07:24:51 +00:00
Update utils to accommodate changes on get_messages
This commit is contained in:
parent
daee188fa5
commit
6cf6d49634
1 changed files with 5 additions and 4 deletions
|
|
@ -638,7 +638,8 @@ def parse_messages(
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
m.reply_to_message = client.get_messages(
|
m.reply_to_message = client.get_messages(
|
||||||
m.chat.id, message.reply_to_msg_id,
|
m.chat.id,
|
||||||
|
reply_to_message_ids=message.id,
|
||||||
replies=replies - 1
|
replies=replies - 1
|
||||||
)
|
)
|
||||||
except FloodWait as e:
|
except FloodWait as e:
|
||||||
|
|
@ -750,8 +751,8 @@ def parse_messages(
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
m.pinned_message = client.get_messages(
|
m.pinned_message = client.get_messages(
|
||||||
m.chat.id, message.reply_to_msg_id,
|
m.chat.id,
|
||||||
replies=0
|
message_ids=message.reply_to_msg_id
|
||||||
)
|
)
|
||||||
except FloodWait as e:
|
except FloodWait as e:
|
||||||
log.warning("get_messages flood: waiting {} seconds".format(e.x))
|
log.warning("get_messages flood: waiting {} seconds".format(e.x))
|
||||||
|
|
@ -948,7 +949,7 @@ def parse_chat_full(
|
||||||
if full_chat.pinned_msg_id:
|
if full_chat.pinned_msg_id:
|
||||||
parsed_chat.pinned_message = client.get_messages(
|
parsed_chat.pinned_message = client.get_messages(
|
||||||
parsed_chat.id,
|
parsed_chat.id,
|
||||||
full_chat.pinned_msg_id
|
message_ids=full_chat.pinned_msg_id
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(full_chat.exported_invite, types.ChatInviteExported):
|
if isinstance(full_chat.exported_invite, types.ChatInviteExported):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue