send_encrypted()

async Client.send_encrypted()

Send an encrypted message to a secret chat.

Usable by Users Bots
Parameters:
  • peer (InputEncryptedChat) – The secret chat to send to.

  • random_id (int) – Random ID for deduplication.

  • data (bytes) – The encrypted message bytes.

  • silent (bool, optional) – If True, send without notification.

Returns:

SentEncryptedMessage – The sent message info.

Example

await app.send_encrypted(peer, random_id=123, data=b"...")