restrict_sponsored_messages()

async Client.restrict_sponsored_messages()

Restrict sponsored messages in a channel.

Usable by Users Bots
Parameters:
  • restricted (bool, *optional*) – Whether sponsored messages are restricted

  • chat_id (int | str) – Unique identifier (int) or username (str) of the target chat.

Returns:

Message

Example

await app.restrict_sponsored_messages(chat_id, ...)