ChatKtx.setDiscussionGroup - libtd-ktx

Kotlin Coroutines extensions for Telegram API TDLib (Telegram Database library)


libtd-ktx / kotlinx.telegram.extensions / ChatKtx / setDiscussionGroup

setDiscussionGroup

open suspend fun Chat.setDiscussionGroup(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

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.