set_chat_direct_messages_group()

async Client.set_chat_direct_messages_group()

Change the direct messages group settings of a channel.

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

  • paid_message_star_count (int, optional) – Amount of Telegram Stars that must be paid for each message sent to the direct messages chat by a user who is not an administrator of the channel, 0-10000. Defaults to 0.

  • is_enabled (bool, optional) – Pass True to enable the direct messages group for the channel, False to disable it.

Returns:

bool – On success, True is returned.

Example

await app.set_chat_direct_messages_group(chat_id, is_enabled=True)