MadelineProtoDocs/docs/API_docs/constructors/channel.md
2024-05-01 14:53:46 +02:00

6.0 KiB

title description nav_exclude image
channel Channel/supergroup info true https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: channel

Back to constructors index

Channel/supergroup info

Attributes:

Name Type Required Description
creator Bool Optional Whether the current user is the creator of this channel
left Bool Optional Whether the current user has left or is not a member of this channel
broadcast Bool Optional Is this a channel?
verified Bool Optional Is this channel verified by telegram?
megagroup Bool Optional Is this a supergroup?
restricted Bool Optional Whether viewing/writing in this channel for a reason (see restriction_reason
signatures Bool Optional Whether signatures are enabled (channels)
min Bool Optional See min
scam Bool Optional This channel/supergroup is probably a scam
has_link Bool Optional Whether this channel has a private join link
has_geo Bool Optional Whether this chanel has a geoposition
slowmode_enabled Bool Optional Whether slow mode is enabled for groups to prevent flood in chat
call_active Bool Optional Whether a group call or livestream is currently active
call_not_empty Bool Optional Whether there's anyone in the group call or livestream
fake Bool Optional If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.
gigagroup Bool Optional Whether this supergroup is a gigagroup
noforwards Bool Optional Whether this channel or group is protected, thus does not allow forwarding messages from it
join_to_send Bool Optional Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend
join_request Bool Optional Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSend
forum Bool Optional Whether this supergroup is a forum
stories_hidden Bool Optional
stories_hidden_min Bool Optional
stories_unavailable Bool Optional
id long Yes ID of the channel
access_hash long Optional Access hash
title string Yes Title
username string Optional Username
photo ChatPhoto Optional Profile photo
date int Yes Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date
restriction_reason Array of RestrictionReason Optional Contains the reason why access to this channel must be restricted.
admin_rights ChatAdminRights Optional Admin rights of the user in this channel (see rights)
banned_rights ChatBannedRights Optional Banned rights of the user in this channel (see rights)
default_banned_rights ChatBannedRights Optional Default chat rights (see rights)
participants_count int Optional Participant count
usernames Array of Username Optional
stories_max_id int Optional
color PeerColor Optional
profile_color PeerColor Optional
emoji_status EmojiStatus Optional
level int Optional

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];