messages.SendEncryptedFile
- class pyrogram.raw.functions.messages.SendEncryptedFile
Sends a message with a file attachment to a secret chat
- Details:
Layer:
223ID:
5559481D
- Parameters:
peer (
InputEncryptedChat) – Secret chat IDrandom_id (
int64-bit) – Unique client message ID necessary to prevent message resendingdata (
bytes) – TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initializationfile (
InputEncryptedFile) – File attachment for the secret chatsilent (
bool, optional) – Whether to send the file without triggering a notification
- Returns:
TL Schema
messages.sendEncryptedFile#5559481d
flags:#
silent:flags.0?true
peer:InputEncryptedChat
random_id:long
data:bytes
file:InputEncryptedFile
= messages.SentEncryptedMessage
Parameter Tree
SendEncryptedFile
├── silent →
true (optional)├── peer →
InputEncryptedChat│ └──
InputEncryptedChat│ ├── chat_id →
int│ └── access_hash →
long├── random_id →
long├── data →
bytes└── file →
InputEncryptedFile│ ├── id →
long│ ├── parts →
int│ ├── md5_checksum →
string│ └── key_fingerprint →
int│ ├── id →
long│ └── access_hash →
long├── id →
long├── parts →
int└── key_fingerprint →
intExample
await app.invoke(
SendEncryptedFile(
silent=None,
peer=InputEncryptedChat(
chat_id=0,
access_hash=0
),
random_id=app.rnd_id(),
data=b"data",
file=InputEncryptedFileEmpty(),
)
)