Link Search Menu Expand Document

Constructor: channel

Back to constructors index

Channel/supergroup info

Attributes:

NameTypeRequiredDescription
creatorBoolOptionalWhether the current user is the creator of this channel
leftBoolOptionalWhether the current user has left or is not a member of this channel
broadcastBoolOptionalIs this a channel?
verifiedBoolOptionalIs this channel verified by telegram?
megagroupBoolOptionalIs this a supergroup?
restrictedBoolOptionalWhether viewing/writing in this channel for a reason (see restriction_reason
signaturesBoolOptionalWhether signatures are enabled (channels)
minBoolOptionalSee min
scamBoolOptionalThis channel/supergroup is probably a scam
has_linkBoolOptionalWhether this channel has a private join link
has_geoBoolOptionalWhether this chanel has a geoposition
slowmode_enabledBoolOptionalWhether slow mode is enabled for groups to prevent flood in chat
call_activeBoolOptionalWhether a group call or livestream is currently active
call_not_emptyBoolOptionalWhether there’s anyone in the group call or livestream
fakeBoolOptionalIf set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
gigagroupBoolOptionalWhether this supergroup is a gigagroup
noforwardsBoolOptionalWhether this channel or group is protected, thus does not allow forwarding messages from it
join_to_sendBoolOptionalWhether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend
join_requestBoolOptionalWhether a user’s join request will have to be approved by administrators, toggle using channels.toggleJoinToSend
forumBoolOptionalWhether this supergroup is a forum
stories_hiddenBoolOptional
stories_hidden_minBoolOptional
stories_unavailableBoolOptional
idlongYesID of the channel
access_hashlongOptionalAccess hash
titlestringYesTitle
usernamestringOptionalUsername
photoChatPhotoOptionalProfile photo
dateintYesDate when the user joined the supergroup/channel, or if the user isn’t a member, its creation date
restriction_reasonArray of RestrictionReasonOptionalContains the reason why access to this channel must be restricted.
admin_rightsChatAdminRightsOptionalAdmin rights of the user in this channel (see rights)
banned_rightsChatBannedRightsOptionalBanned rights of the user in this channel (see rights)
default_banned_rightsChatBannedRightsOptionalDefault chat rights (see rights)
participants_countintOptionalParticipant count
usernamesArray of UsernameOptional
stories_max_idintOptional
colorPeerColorOptional
profile_colorPeerColorOptional
emoji_statusEmojiStatusOptional
levelintOptional

Type: Chat

Example:

$channel = ['_' => 'channel', 'creator' => Bool, 'left' => Bool, 'broadcast' => Bool, 'verified' => Bool, 'megagroup' => Bool, 'restricted' => Bool, 'signatures' => Bool, 'min' => Bool, 'scam' => Bool, 'has_link' => Bool, 'has_geo' => Bool, 'slowmode_enabled' => Bool, 'call_active' => Bool, 'call_not_empty' => Bool, 'fake' => Bool, 'gigagroup' => Bool, 'noforwards' => Bool, 'join_to_send' => Bool, 'join_request' => Bool, 'forum' => Bool, 'stories_hidden' => Bool, 'stories_hidden_min' => Bool, 'stories_unavailable' => Bool, 'id' => long, 'access_hash' => long, 'title' => 'string', 'username' => 'string', 'photo' => ChatPhoto, 'date' => int, 'restriction_reason' => [RestrictionReason, RestrictionReason], 'admin_rights' => ChatAdminRights, 'banned_rights' => ChatBannedRights, 'default_banned_rights' => ChatBannedRights, 'participants_count' => int, 'usernames' => [Username, Username], 'stories_max_id' => int, 'color' => PeerColor, 'profile_color' => PeerColor, 'emoji_status' => EmojiStatus, 'level' => int];