MadelineProtoDocs/old_docs/API_docs_v105/constructors/channel.md
2019-12-27 17:48:04 +01:00

3.7 KiB

title description image
channel Channel/supergroup info 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 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
id int 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 Creation date
version int Yes Version of the channel (always 0)
restriction_reason Array of RestrictionReason Optional Restriction reason
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

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, 'id' => int, 'access_hash' => long, 'title' => 'string', 'username' => 'string', 'photo' => ChatPhoto, 'date' => int, 'version' => int, 'restriction_reason' => [RestrictionReason, RestrictionReason], 'admin_rights' => ChatAdminRights, 'banned_rights' => ChatBannedRights, 'default_banned_rights' => ChatBannedRights, 'participants_count' => int];

Or, if you're into Lua:

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, id=int, access_hash=long, title='string', username='string', photo=ChatPhoto, date=int, version=int, restriction_reason={RestrictionReason}, admin_rights=ChatAdminRights, banned_rights=ChatBannedRights, default_banned_rights=ChatBannedRights, participants_count=int}