messages.ForwardMessages
- class pyrogram.raw.functions.messages.ForwardMessages
Forwards messages by their IDs.
- Details:
Layer:
223ID:
13704A7C
- Parameters:
from_peer (
InputPeer) – Source of messagesid (List of
int32-bit) – IDs of messagesrandom_id (List of
int64-bit) – Random ID to prevent resending of messagesto_peer (
InputPeer) – Destination peersilent (
bool, optional) – Whether to send messages silently (no notification will be triggered on the destination clients)background (
bool, optional) – Whether to send the message in backgroundwith_my_score (
bool, optional) – When forwarding games, whether to include your score in the gamedrop_author (
bool, optional) – Whether to forward messages without quoting the original authordrop_media_captions (
bool, optional) – Whether to strip captions from medianoforwards (
bool, optional) – Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn’t have content protection enabledallow_paid_floodskip (
bool, optional) – Bots only: if set, allows sending up to 1000 messages per second, ignoring broadcasting limits for a fee of 0.1 Telegram Stars per message. The relevant Stars will be withdrawn from the bot’s balance.top_msg_id (
int32-bit, optional) – Destination forum topicreply_to (
InputReplyTo, optional) – Can only contain an inputReplyToMonoForum, to forward messages to a monoforum topic (mutually exclusive with top_msg_id).schedule_date (
int32-bit, optional) – Scheduled message date for scheduled messagesschedule_repeat_period (
int32-bit, optional)send_as (
InputPeer, optional) – Forward the messages as the specified peerquick_reply_shortcut (
InputQuickReplyShortcut, optional) – Add the messages to the specified quick reply shortcut », instead.effect (
int64-bit, optional)video_timestamp (
int32-bit, optional) – Start playing the video at the specified timestamp (seconds).allow_paid_stars (
int64-bit, optional) – For paid messages », specifies the amount of Telegram Stars the user has agreed to pay in order to send the message.suggested_post (
SuggestedPost, optional) – Used to suggest a post to a channel, see here » for more info on the full flow.
- Returns:
TL Schema
messages.forwardMessages#13704a7c
flags:#
silent:flags.5?true
background:flags.6?true
with_my_score:flags.8?true
drop_author:flags.11?true
drop_media_captions:flags.12?true
noforwards:flags.14?true
allow_paid_floodskip:flags.19?true
from_peer:InputPeer
id:Vector<int>
random_id:Vector<long>
to_peer:InputPeer
top_msg_id:flags.9?int
reply_to:flags.22?InputReplyTo
schedule_date:flags.10?int
schedule_repeat_period:flags.24?int
send_as:flags.13?InputPeer
quick_reply_shortcut:flags.17?InputQuickReplyShortcut
effect:flags.18?long
video_timestamp:flags.20?int
allow_paid_stars:flags.21?long
suggested_post:flags.23?SuggestedPost
= Updates
Parameter Tree
true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)true (optional)InputPeerInputPeerEmptyInputPeerSelfInputPeerChatlongInputPeerUserlonglongInputPeerChannellonglongInputPeerUserFromMessageInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongVector < int >Vector < long >InputPeerInputPeerEmptyInputPeerSelfInputPeerChatlongInputPeerUserlonglongInputPeerChannellonglongInputPeerUserFromMessageInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongint (optional)InputReplyTo (optional)InputReplyToMessageintint (optional)InputPeer (optional)InputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessagestring (optional)Vector < MessageEntity > (optional)MessageEntityUnknownintintMessageEntityMentionintintMessageEntityHashtagintintMessageEntityBotCommandintintMessageEntityUrlintintMessageEntityEmailintintMessageEntityBoldintintMessageEntityItalicintintMessageEntityCodeintintMessageEntityPreintintstringMessageEntityTextUrlintintstringMessageEntityMentionNameintintlongInputMessageEntityMentionNameintintInputUserInputUserEmptyInputUserSelfInputUserInputUserFromMessageMessageEntityPhoneintintMessageEntityCashtagintintMessageEntityUnderlineintintMessageEntityStrikeintintMessageEntityBankCardintintMessageEntitySpoilerintintMessageEntityCustomEmojiintintlongMessageEntityBlockquotetrue (optional)intintMessageEntityFormattedDatetrue (optional)true (optional)true (optional)true (optional)true (optional)true (optional)intintintint (optional)InputPeer (optional)InputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageint (optional)InputReplyToStoryInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintInputReplyToMonoForumInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageint (optional)int (optional)InputPeer (optional)InputPeerEmptyInputPeerSelfInputPeerChatlongInputPeerUserlonglongInputPeerChannellonglongInputPeerUserFromMessageInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongInputPeerInputPeerEmptyInputPeerSelfInputPeerChatInputPeerUserInputPeerChannelInputPeerUserFromMessageInputPeerChannelFromMessageintlongInputQuickReplyShortcut (optional)InputQuickReplyShortcutstringintlong (optional)int (optional)long (optional)SuggestedPost (optional)SuggestedPosttrue (optional)true (optional)StarsAmount (optional)StarsAmountlongintStarsTonAmountlongint (optional)Example
await app.invoke(
ForwardMessages(
silent=None,
background=None,
with_my_score=None,
drop_author=None,
drop_media_captions=None,
noforwards=None,
allow_paid_floodskip=None,
from_peer=await app.resolve_peer(chat_id),
id=[0],
random_id=[app.rnd_id()],
to_peer=await app.resolve_peer(chat_id),
top_msg_id=0,
reply_to=InputReplyToMessage(
reply_to_msg_id=0,
top_msg_id=None,
reply_to_peer_id=None,
quote_text=None,
quote_entities=None,
quote_offset=None,
monoforum_peer_id=None,
todo_item_id=None
),
schedule_date=0,
schedule_repeat_period=0,
send_as=await app.resolve_peer(chat_id),
quick_reply_shortcut=InputQuickReplyShortcut(shortcut="text"),
effect=0,
video_timestamp=0,
allow_paid_stars=0,
suggested_post=SuggestedPost(
accepted=None,
rejected=None,
price=None,
schedule_date=None
),
)
)