Skip to content

set chat discussion group

Alexey Kravtsov edited this page May 19, 2020 · 1 revision

libtd-ktx / kotlinx.telegram.coroutines / setChatDiscussionGroup

setChatDiscussionGroup

suspend fun TelegramFlow.setChatDiscussionGroup(chatId: Long, discussionChatId: Long): Unit

Suspend function, which changes the discussion group of a channel chat; requires canChangeInfo rights in the channel if it is specified.

Parameters

chatId - Identifier of the channel chat. Pass 0 to remove a link from the supergroup passed in the second argument to a linked channel chat (requires canPinMessages rights in the supergroup).

discussionChatId - Identifier of a new channel's discussion group. Use 0 to remove the discussion group. Use the method getSuitableDiscussionChats to find all suitable groups. Basic group chats needs to be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable needs to be used first to change that.

Clone this wiki locally