unban_chat_sender_chat()

async Client.unban_chat_sender_chat()

Unban a previously banned channel chat in a supergroup or channel.

After unbanning, the channel will be able to send messages in the chat again. You must be an administrator with the appropriate admin rights.

Usable by Users Bots
Parameters:
  • chat_id (int | str) – Unique identifier (int) or username (str) of the target supergroup or channel.

  • sender_chat_id (int | str) – Unique identifier (int) or username (str) of the channel chat to unban.

Returns:

bool – True on success.

Example

# Unban a channel that was previously banned from sending messages
await app.unban_chat_sender_chat(chat_id, sender_chat_id)