DiscardEncryptionRequest
Only users can use this request. See code examples.
---functions--- messages.discardEncryption#f393aea0 flags:# delete_history:flags.0?true chat_id:int = Bool
Returns
Bool |
This type has no instances available.
Parameters
chat_id | int | |
delete_history | flag | This argument defaults to None and can be omitted. |
Known RPC errors
This request can cause 3 known errors:
ChatIdEmptyError | The provided chat ID is empty. |
EncryptionAlreadyDeclinedError | The secret chat was already declined. |
EncryptionIdInvalidError | The provided secret chat ID is invalid. |
You can import these from telethon.errors
.
Example
from telethon.sync import TelegramClient from telethon import functions, types with TelegramClient(name, api_id, api_hash) as client: result = client(functions.messages.DiscardEncryptionRequest( chat_id=478614198, delete_history=True )) print(result)