set_chat_direct_messages_group()

Client.set_chat_direct_messages_group()

Change direct messages group settings for a channel chat.

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

  • paid_message_star_count (bool) – The new number of Telegram Stars that must be paid for each message that is sent to the direct messages chat unless the sender is an administrator of the channel chat, 0-10000.

  • is_enabled (bool, optional) – Pass True if the direct messages group is enabled for the channel chat. Pass False otherwise

Returns:

bool – True on success. False otherwise.

Example

# Enable direct messages
await app.set_chat_direct_messages_group(chat_id, is_enabled=True)