messages.CreateChat
- class pyrogram.raw.functions.messages.CreateChat
Creates a new chat.
- Details:
Layer:
223ID:
92CEDDD4
- Parameters:
users (List of
InputUser) – List of user IDs to be invitedtitle (
str) – Chat namettl_period (
int32-bit, optional) – Time-to-live of all messages that will be sent in the chat: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later.
- Returns:
TL Schema
messages.createChat#92ceddd4
flags:#
users:Vector<InputUser>
title:string
ttl_period:flags.0?int
= messages.InvitedUsers
Parameter Tree
CreateChat
├── users →
Vector < InputUser >│ ├──
InputUserEmpty│ ├──
InputUserSelf│ ├──
InputUser│ │ ├── user_id →
long│ │ └── access_hash →
long│ └──
InputUserFromMessage│ ├── peer →
InputPeer│ │ ├──
InputPeerEmpty│ │ ├──
InputPeerSelf│ │ ├──
InputPeerChat│ │ ├──
InputPeerUser│ │ ├──
InputPeerChannel│ │ ├──
InputPeerUserFromMessage│ │ └──
InputPeerChannelFromMessage│ ├── msg_id →
int│ └── user_id →
long├── title →
string└── ttl_period →
int (optional)Example
await app.invoke(
CreateChat(
users=[
await app.resolve_user(chat_id)
],
title="text",
ttl_period=0,
)
)