mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-08 07:54:52 +00:00
chore(send_media_group.py): simplify parse_text_entities handling
Refactored to use ** unpacking directly in raw.types.InputSingleMedia, reducing variable assignments.
This commit is contained in:
parent
42b2d46f7d
commit
fdb43c3a6a
1 changed files with 1 additions and 5 deletions
|
|
@ -463,15 +463,11 @@ class SendMediaGroup:
|
|||
else:
|
||||
raise ValueError(f"{i.__class__.__name__} is not a supported type for send_media_group")
|
||||
|
||||
message, entities = (
|
||||
await utils.parse_text_entities(self, i.caption, i.parse_mode, i.caption_entities)).values()
|
||||
|
||||
multi_media.append(
|
||||
raw.types.InputSingleMedia(
|
||||
media=media,
|
||||
random_id=self.rnd_id(),
|
||||
message=message,
|
||||
entities=entities,
|
||||
**(await utils.parse_text_entities(self, i.caption, i.parse_mode, i.caption_entities))
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue