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

2.3 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
kicked Bool Optional Kicked?
left Bool Optional Whether the current user has left this channel
editor Bool Optional Editor?
moderator Bool Optional Moderator?
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
id int Yes ID of the channel
access_hash long Yes 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)
restiction_reason string Optional Restiction reason

Type: Chat

Example:

$channel = ['_' => 'channel', 'creator' => Bool, 'kicked' => Bool, 'left' => Bool, 'editor' => Bool, 'moderator' => Bool, 'broadcast' => Bool, 'verified' => Bool, 'megagroup' => Bool, 'restricted' => Bool, 'id' => int, 'access_hash' => long, 'title' => 'string', 'username' => 'string', 'photo' => ChatPhoto, 'date' => int, 'version' => int, 'restiction_reason' => 'string'];

Or, if you're into Lua:

channel={_='channel', creator=Bool, kicked=Bool, left=Bool, editor=Bool, moderator=Bool, broadcast=Bool, verified=Bool, megagroup=Bool, restricted=Bool, id=int, access_hash=long, title='string', username='string', photo=ChatPhoto, date=int, version=int, restiction_reason='string'}