StartLiveRequest
Both users and bots may be able to use this request. See code examples.
---functions--- stories.startLive#d069ccde flags:# 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 |
This type can be an instance of either:
| UpdateShort | UpdateShortChatMessage |
| UpdateShortMessage | UpdateShortSentMessage |
| Updates | UpdatesCombined |
| UpdatesTooLong |
Parameters
| peer | InputPeer | Anything entity-like will work if the library can find its Input version (e.g., usernames, Peer, User or Channel objects, etc.). |
| privacy_rules | InputPrivacyRule | A list must be supplied. |
| pinned | flag | This argument defaults to None and can be omitted. |
| noforwards | flag | This argument defaults to None and can be omitted. |
| rtmp_stream | flag | This argument defaults to None and can be omitted. |
| caption | string | This argument defaults to None and can be omitted. |
| entities | MessageEntity | This argument defaults to None and can be omitted. Otherwise, a list must be supplied. |
| random_id | long | If left unspecified, it will be inferred automatically. |
| messages_enabled | Bool | This argument defaults to None and can be omitted. |
| send_paid_messages_stars | long | This argument defaults to None and can be omitted. |
Known RPC errors
This request can't cause any RPC error as far as we know.
Example
from telethon.sync import TelegramClient
from telethon import functions, types
with TelegramClient(name, api_id, api_hash) as client:
result = client(functions.stories.StartLiveRequest(
peer='username',
privacy_rules=[types.InputPrivacyValueAllowContacts()],
pinned=True,
noforwards=True,
rtmp_stream=True,
caption='some string here',
messages_enabled=False,
send_paid_messages_stars=-12398745604826
))
print(result.stringify())