channels.CreateChannel

class pyrogram.raw.functions.channels.CreateChannel

Create a supergroup/channel.

Details:
  • Layer: 223

  • ID: 91006707

Parameters:
  • title (str) – Channel title

  • about (str) – Channel description

  • broadcast (bool, optional) – Whether to create a channel

  • megagroup (bool, optional) – Whether to create a supergroup

  • for_import (bool, optional) – Whether the supergroup is being created to import messages from a foreign chat service using messages.initHistoryImport

  • forum (bool, optional) – Whether to create a forum

  • geo_point (InputGeoPoint, optional) – Geogroup location, see here » for more info on geogroups.

  • address (str, optional) – Geogroup address, see here » for more info on geogroups.

  • ttl_period (int 32-bit, optional) – Time-to-live of all messages that will be sent in the supergroup: once message.date+message.ttl_period === time(), the message will be deleted on the server, and must be deleted locally as well. You can use messages.setDefaultHistoryTTL to edit this value later.

Returns:

Updates

TL Schema

channels.createChannel#91006707
flags:#
broadcast:flags.0?true
megagroup:flags.1?true
for_import:flags.3?true
forum:flags.5?true
title:string
about:string
geo_point:flags.2?InputGeoPoint
address:flags.2?string
ttl_period:flags.4?int

= Updates

Parameter Tree

CreateChannel
├── broadcasttrue (optional)
├── megagrouptrue (optional)
├── for_importtrue (optional)
├── forumtrue (optional)
├── titlestring
├── aboutstring
├── geo_pointInputGeoPoint (optional)
│ ├── InputGeoPointEmpty
│ └── InputGeoPoint
│ ├── latdouble
│ ├── longdouble
│ └── accuracy_radiusint (optional)
├── addressstring (optional)
└── ttl_periodint (optional)

Example

await app.invoke(
    CreateChannel(
        broadcast=None,
        megagroup=None,
        for_import=None,
        forum=None,
        title="text",
        about="text",
        geo_point=InputGeoPointEmpty(),
        address="text",
        ttl_period=0,
    )
)