Leave a group chat or channel.
str) – Unique identifier for the target chat or username of the target channel/supergroup (in the format @username).
bool, optional) – Deletes the group chat dialog after leaving (for simple group chats, not supergroups). Defaults to False.
# Leave chat or channel app.leave_chat(chat_id) # Leave basic chat and also delete the dialog app.leave_chat(chat_id, delete=True)