SendEncryptedFile

class pyrogram.raw.functions.messages.SendEncryptedFile

Sends a message with a file attachment to a secret chat.

Details
  • Layer: 126

  • ID: 0x5559481d

Parameters
  • peer (InputEncryptedChat) – Secret chat ID.

  • random_id (int 64-bit) – Unique client message ID necessary to prevent message resending.

  • data (bytes) – TL-serialization of DecryptedMessage type, encrypted with a key generated during chat initialization.

  • file (InputEncryptedFile) – File attachment for the secret chat.

  • silent (bool, optional) – Whether to send the file without triggering a notification.

Returns

messages.SentEncryptedMessage – Contains info on message sent to an encrypted chat.