mirror of
https://github.com/danog/MadelineProtoDocs.git
synced 2024-12-02 09:38:28 +01:00
3.0 KiB
3.0 KiB
title | description | grand_parent | parent | image | redirect_from |
---|---|---|---|---|---|
messages.forwardMessages | Forwards messages by their IDs. | Telegram RPC API | Methods | https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png | /API_docs/methods/messages_forwardMessages.html |
Method: messages.forwardMessages
Forwards messages by their IDs.
Parameters:
Name | Type | Description | Required |
---|---|---|---|
silent | Bool | Whether to send messages silently (no notification will be triggered on the destination clients) | Optional |
background | Bool | Whether to send the message in background | Optional |
with_my_score | Bool | When forwarding games, whether to include your score in the game | Optional |
drop_author | Bool | Whether to forward messages without quoting the original author | Optional |
drop_media_captions | Bool | Whether to strip captions from media | Optional |
noforwards | Bool | Only for bots, disallows further re-forwarding and saving of the messages, even if the destination chat doesn't have content protection enabled | Optional |
from_peer | Username, chat ID, Update, Message or InputPeer | Source of messages | Optional |
id | Array of int | IDs of messages | Yes |
to_peer | Username, chat ID, Update, Message or InputPeer | Destination peer | Optional |
top_msg_id | int | Destination forum topic | Optional |
schedule_date | int | Scheduled message date for scheduled messages | Optional |
send_as | Username, chat ID, Update, Message or InputPeer | Forward the messages as the specified peer | Optional |
quick_reply_shortcut | InputQuickReplyShortcut | Optional |
Return type: Updates
Can bots use this method: YES
MadelineProto Example (now async for huge speed and parallelism!):
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Updates = $MadelineProto->messages->forwardMessages(silent: $Bool, background: $Bool, with_my_score: $Bool, drop_author: $Bool, drop_media_captions: $Bool, noforwards: $Bool, from_peer: $InputPeer, id: [$int, $int], to_peer: $InputPeer, top_msg_id: $int, schedule_date: $int, send_as: $InputPeer, quick_reply_shortcut: $InputQuickReplyShortcut, );