api.createNewSupergroupChat()
Creates a new supergroup or channel and sends a corresponding messageSupergroupChatCreate. Returns the newly created chat
Parameters
CreateNewSupergroupChatParams
:chevron_leftchevron_right
Parameters
Interface
Name | Type | Description |
---|---|---|
title | string | Title of the new chat; 1-128 characters |
isChannel | boolean | True, if a channel chat needs to be created |
description | string | Chat description; 0-255 characters |
location | Chat location if a location-based supergroup is being created; pass null to create an ordinary supergroup chat | |
forImport | boolean | True, if the supergroup is created for importing messages using importMessage |
Returns
ApiResponse
interface:interface ApiResponse {
_: 'createNewSupergroupChat' | 'error'
airgram: Airgram
request: {
method: 'createNewSupergroupChat'
params: CreateNewSupergroupChatParams
}
response: |
setState: (nextState: Record<string, unknown>) => void
getState: () => Record<string, unknown>
}