MadelineProtoDocs/docs/TD_docs/constructors/channel.md
Daniil Gentili e5a1324684 docufix
2018-04-04 23:19:57 +00:00

2.0 KiB

title: channel description: Represents a channel with zero or more subscribers. There two different kinds of channels: supergroups and broadcast channels image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: channel

Back to constructors index

Represents a channel with zero or more subscribers. There two different kinds of channels: supergroups and broadcast channels

Attributes:

Name Type Required Description
id int Yes Channel identifier
username string Yes Channel username, empty for private channels
date int Yes Date when current user has joined the channel or date when channel was created, if user is not a member. Unix time
status ChatMemberStatus Yes Status of the current user in the channel
anyone_can_invite Bool Yes True, if any member of the supergroup can invite other members. If the channel is not a supergroup, the field is meaningless
sign_messages Bool Yes True, if messages sent to the channel should content information about the sender. If the channel is a supergroup, the field is meaningless
is_supergroup Bool Yes True, if channel is a supergroup and is not a broadcast
is_verified Bool Yes True, if the channel is verified
restriction_reason string Yes If non-empty, contains the reason, why access to this channel must be restricted. Format of the string is "{type}: {description}". {type} contains type of the restriction and at least one of the suffixes "-all", "-ios", "-android", "-wp", which describes platforms on which access should be restricted. For example, "terms-ios-android". {description} contains human-readable description of the restriction, which can be showed to the user

Type: Channel