leave_folder()#

Client.leave_folder()#

Leave a folder by its invite link.

Usable by Users Bots
Parameters:
  • link (str) – Invite link of the folder.

  • keep_chats (bool, optional) – If True, the chats from the folder will be kept in the user’s account. Defaults to True.

Returns:

bool – True, on success.

Raises:
  • AttributeError – In case the folder invite link does not exist in the user’s account.

  • BadRequest – In case the folder invite link not exists.

  • ValueError – In case the folder invite link is invalid.

Example

# leave folder
app.leave_folder("t.me/addlist/ebXQ0Q0I3RnGQ")