Airgram

Guides
/
/
Methods

api.setChatDiscussionGroup()

Changes the discussion group of a channel chat; requires can_change_info administrator right in the channel if it is specified

Parameters SetChatDiscussionGroupParams:

NameTypeDescription
chatIdnumber 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 can_pin_messages rights in the supergroup)
discussionChatIdnumber 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 must be first upgraded to supergroup chats. If new chat members don't have access to old messages in the supergroup, then toggleSupergroupIsAllHistoryAvailable must be used first to change that
Returns ApiResponse interface:
interface ApiResponse {
  _: 'setChatDiscussionGroup' | 'error'
  airgram: Airgram
  request: {
    method: 'setChatDiscussionGroup'
    params: SetChatDiscussionGroupParams
  }
  response:  | 
  setState: (nextState: Record<string, unknown>) => void
  getState: () => Record<string, unknown>
}