MadelineProtoDocs/old_docs/API_docs_v30/constructors/channel.md
2020-06-16 17:50:25 +02:00

3.1 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
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 Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date
version int Yes Version of the channel (always 0)
restriction_reason string Optional
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, 'id' => int, 'access_hash' => long, 'title' => 'string', 'username' => 'string', 'photo' => ChatPhoto, 'date' => int, 'version' => int, 'restriction_reason' => 'string', '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, id=int, access_hash=long, title='string', username='string', photo=ChatPhoto, date=int, version=int, restriction_reason='string', admin_rights=ChatAdminRights, banned_rights=ChatBannedRights, default_banned_rights=ChatBannedRights, participants_count=int}