Leave a group chat or channel.Usable by Users Bots
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 await app.leave_chat(chat_id) # Leave basic chat and also delete the dialog await app.leave_chat(chat_id, delete=True)