Add schedule_date parameter to send_media_group()
This commit is contained in:
parent
a6f8827433
commit
90cee1ea89
@ -42,7 +42,8 @@ class SendMediaGroup(Scaffold):
|
|||||||
"types.InputMediaDocument"
|
"types.InputMediaDocument"
|
||||||
]],
|
]],
|
||||||
disable_notification: bool = None,
|
disable_notification: bool = None,
|
||||||
reply_to_message_id: int = None
|
reply_to_message_id: int = None,
|
||||||
|
schedule_date: int = None,
|
||||||
) -> List["types.Message"]:
|
) -> List["types.Message"]:
|
||||||
"""Send a group of photos or videos as an album.
|
"""Send a group of photos or videos as an album.
|
||||||
|
|
||||||
@ -62,6 +63,9 @@ class SendMediaGroup(Scaffold):
|
|||||||
reply_to_message_id (``int``, *optional*):
|
reply_to_message_id (``int``, *optional*):
|
||||||
If the message is a reply, ID of the original message.
|
If the message is a reply, ID of the original message.
|
||||||
|
|
||||||
|
schedule_date (``int``, *optional*):
|
||||||
|
Date when the message will be automatically sent. Unix time.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
List of :obj:`~pyrogram.types.Message`: On success, a list of the sent messages is returned.
|
List of :obj:`~pyrogram.types.Message`: On success, a list of the sent messages is returned.
|
||||||
|
|
||||||
@ -270,7 +274,8 @@ class SendMediaGroup(Scaffold):
|
|||||||
peer=await self.resolve_peer(chat_id),
|
peer=await self.resolve_peer(chat_id),
|
||||||
multi_media=multi_media,
|
multi_media=multi_media,
|
||||||
silent=disable_notification or None,
|
silent=disable_notification or None,
|
||||||
reply_to_msg_id=reply_to_message_id
|
reply_to_msg_id=reply_to_message_id,
|
||||||
|
schedule_date=schedule_date
|
||||||
),
|
),
|
||||||
sleep_threshold=60
|
sleep_threshold=60
|
||||||
)
|
)
|
||||||
@ -279,7 +284,9 @@ class SendMediaGroup(Scaffold):
|
|||||||
self,
|
self,
|
||||||
raw.types.messages.Messages(
|
raw.types.messages.Messages(
|
||||||
messages=[m.message for m in filter(
|
messages=[m.message for m in filter(
|
||||||
lambda u: isinstance(u, (raw.types.UpdateNewMessage, raw.types.UpdateNewChannelMessage)),
|
lambda u: isinstance(u, (raw.types.UpdateNewMessage,
|
||||||
|
raw.types.UpdateNewChannelMessage,
|
||||||
|
raw.types.UpdateNewScheduledMessage)),
|
||||||
r.updates
|
r.updates
|
||||||
)],
|
)],
|
||||||
users=r.users,
|
users=r.users,
|
||||||
|
Loading…
Reference in New Issue
Block a user