MadelineProtoDocs/docs/API_docs/constructors/channel.md

3.0 KiB

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

Constructor: channel

Back to constructors index

Channel

Attributes:

Name Type Required Description
creator Bool Optional Creator?
left Bool Optional Left?
broadcast Bool Optional Broadcast?
verified Bool Optional Verified?
megagroup Bool Optional Megagroup?
restricted Bool Optional Restricted?
signatures Bool Optional Signatures?
min Bool Optional Min?
scam Bool Optional Scam channel
has_link Bool Optional Has linked chat?
has_geo Bool Optional Whether this is a geogroup
slowmode_enabled Bool Optional Whether slowmode is enabled
id int Yes ID
access_hash long Optional Access hash
title string Yes Title
username string Optional Username
photo ChatPhoto Optional Photo
date int Yes Date
version int Yes Version
restriction_reason Array of RestrictionReason Optional Restriction reason
admin_rights ChatAdminRights Optional Admin rights of current user
banned_rights ChatBannedRights Optional Banned rights of current user
default_banned_rights ChatBannedRights Optional Global chat banned rights
participants_count int Optional Participants 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}