SendStory

---functions---
stories.sendStory#8f9e6898 pinned:flags.2?true noforwards:flags.4?true fwd_modified:flags.7?true peer:InputPeer media:InputMedia media_areas:flags.5?Vector<MediaArea> caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long period:flags.3?int fwd_from_id:flags.6?InputPeer fwd_from_story:flags.6?int albums:flags.8?Vector<int> music:flags.9?InputDocument = Updates

Returns

Updates

Parameters

pinnedtrueoptional
noforwardstrueoptional
fwd_modifiedtrueoptional
peerInputPeerrequired
mediaInputMediarequired
media_areasVector<MediaArea>optional
captionstringoptional
entitiesVector<MessageEntity>optional
privacy_rulesVector<InputPrivacyRule>required
random_idlongrequired
periodintoptional
fwd_from_idInputPeeroptional
fwd_from_storyintoptional
albumsVector<int>optional
musicInputDocumentoptional

Example

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

Minimal
import asyncio
import random
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.stories.SendStory(
        peer='username',
        media=raw.types.InputMediaEmpty(),
        privacy_rules=[raw.types.InputPrivacyValueAllowAll()],
        random_id=random.randrange(-2**63, 2**63)
    )
    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
import random
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.stories.SendStory(
        pinned=True,
        noforwards=True,
        fwd_modified=True,
        peer=raw.types.InputPeerSelf(),
        media=raw.types.InputMediaEmpty(),
        media_areas=[raw.types.MediaArea()],
        caption='some string here',
        entities=[raw.types.MessageEntityUnknown(offset=0, length=1)],
        privacy_rules=[raw.types.InputPrivacyValueAllowAll()],
        random_id=random.randrange(-2**63, 2**63),
        period=42,
        fwd_from_id=raw.types.InputPeerSelf(),
        fwd_from_story=42,
        albums=[42],
        music=raw.types.InputDocumentEmpty()
    ))
    print(result)

asyncio.run(main())