create_supergroup()¶
- Client.create_supergroup()¶
Create a new supergroup.
Note
If you want to create a new basic group, use
create_group()instead.Usable by Users Bots
- Parameters:¶
title (``str``) – The supergroup title.
description (``str``, *optional*) – The supergroup description.
message_auto_delete_time (``int``, *optional*) – Message auto-delete time value, in seconds; must be from 0 up to 365 * 86400 and be divisible by 86400. If 0, then messages aren’t deleted automatically.
is_forum (``bool``, *optional*) – Pass True to create a forum supergroup chat. Defaults to False.
for_import (``bool``, *optional*) – Pass True to create a supergroup for importing messages.
location (:obj:`~pyrogram.types.ChatLocation`, *optional*) – Chat location if a location-based supergroup is being created; pass None to create an ordinary supergroup chat.
- Returns:¶
:obj:`~pyrogram.types.Chat` (On success, a chat object is returned.)
Example
await app.create_supergroup("Supergroup Title", "Supergroup Description")