ForwardMessages

---functions---
messages.forwardMessages#13704a7c 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

Returns

Updates

Parameters

silenttrueoptional
backgroundtrueoptional
with_my_scoretrueoptional
drop_authortrueoptional
drop_media_captionstrueoptional
noforwardstrueoptional
allow_paid_floodskiptrueoptional
from_peerInputPeerrequired
idVector<int>required
random_idVector<long>required
to_peerInputPeerrequired
top_msg_idintoptional
reply_toInputReplyTooptional
schedule_dateintoptional
schedule_repeat_periodintoptional
send_asInputPeeroptional
quick_reply_shortcutInputQuickReplyShortcutoptional
effectlongoptional
video_timestampintoptional
allow_paid_starslongoptional
suggested_postSuggestedPostoptional

Example

The examples below use placeholder values. Replace them with real data before running the code.

Minimal
import asyncio
from ferogram import Client

app = Client("my_session", api_id=12345, api_hash="0123456789abcdef0123456789abcdef")

async def main():
    await app.start()
    result = await app.raw.messages.ForwardMessages(
        from_peer='username',
        id=[42],
        random_id=[random.randrange(-2**63, 2**63)],
        to_peer='username'
    )
    print(result)

asyncio.run(main())

The minimal example uses Ferogram's raw proxy shorthand. Peers can be passed as strings and required primitives get safe defaults. Expand Full API to see every parameter.

Full API
import asyncio
from ferogram import Client, raw

app = Client("my_session", api_id=12345, api_hash="0123456789abcdef0123456789abcdef")

async def main():
    await app.start()
    result = await app(raw.functions.messages.ForwardMessages(
        silent=True,
        background=True,
        with_my_score=True,
        drop_author=True,
        drop_media_captions=True,
        noforwards=True,
        allow_paid_floodskip=True,
        from_peer=raw.types.InputPeerSelf(),
        id=[42],
        random_id=[random.randrange(-2**63, 2**63)],
        to_peer=raw.types.InputPeerSelf(),
        top_msg_id=42,
        reply_to=raw.types.InputReplyToMessage(reply_to_msg_id=42),
        schedule_date=42,
        schedule_repeat_period=42,
        send_as=raw.types.InputPeerSelf(),
        quick_reply_shortcut=raw.types.InputQuickReplyShortcutId(shortcut_id=0),
        effect=-12398745604826,
        video_timestamp=42,
        allow_paid_stars=-12398745604826,
        suggested_post=raw.types.SuggestedPost(date=0)
    ))
    print(result)

asyncio.run(main())