StartLive

---functions---
stories.startLive#d069ccde pinned:flags.2?true noforwards:flags.4?true rtmp_stream:flags.5?true peer:InputPeer caption:flags.0?string entities:flags.1?Vector<MessageEntity> privacy_rules:Vector<InputPrivacyRule> random_id:long messages_enabled:flags.6?Bool send_paid_messages_stars:flags.7?long = Updates

Returns

Updates

Parameters

pinnedtrueoptional
noforwardstrueoptional
rtmp_streamtrueoptional
peerInputPeerrequired
captionstringoptional
entitiesVector<MessageEntity>optional
privacy_rulesVector<InputPrivacyRule>required
random_idlongrequired
messages_enabledBooloptional
send_paid_messages_starslongoptional

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.StartLive(
        peer='username',
        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.StartLive(
        pinned=True,
        noforwards=True,
        rtmp_stream=True,
        peer=raw.types.InputPeerSelf(),
        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),
        messages_enabled=False,
        send_paid_messages_stars=-12398745604826
    ))
    print(result)

asyncio.run(main())