mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-02 05:24:51 +00:00
Return the higher-level Message object instead of the raw update
This commit is contained in:
parent
6015a14182
commit
8d35559f0b
1 changed files with 9 additions and 1 deletions
|
|
@ -19,7 +19,7 @@
|
|||
import os
|
||||
|
||||
from pyrogram.api import functions, types
|
||||
from pyrogram.client.ext import BaseClient
|
||||
from pyrogram.client.ext import BaseClient, utils
|
||||
from pyrogram.client.types import (
|
||||
InputMediaPhoto
|
||||
)
|
||||
|
|
@ -61,3 +61,11 @@ class EditMessageMedia(BaseClient):
|
|||
**style.parse(caption)
|
||||
)
|
||||
)
|
||||
|
||||
for i in r.updates:
|
||||
if isinstance(i, (types.UpdateEditMessage, types.UpdateEditChannelMessage)):
|
||||
return utils.parse_messages(
|
||||
self, i.message,
|
||||
{i.id: i for i in r.users},
|
||||
{i.id: i for i in r.chats}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue