MadelineProtoDocs/old_docs/API_docs_v82/constructors/channel.md
Daniil Gentili f73c175203 Update docs
2018-12-26 01:56:50 +00:00

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?
editor Bool Optional Editor?
broadcast Bool Optional Broadcast?
verified Bool Optional Verified?
megagroup Bool Optional Megagroup?
restricted Bool Optional Restricted?
democracy Bool Optional Democracy?
signatures Bool Optional Signatures?
min Bool Optional Min?
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 string Optional Restriction reason
admin_rights ChannelAdminRights Optional Admin rights
banned_rights ChannelBannedRights Optional Banned rights
participants_count int Optional Participants count

Type: Chat

Example:

$channel = ['_' => 'channel', 'creator' => Bool, 'left' => Bool, 'editor' => Bool, 'broadcast' => Bool, 'verified' => Bool, 'megagroup' => Bool, 'restricted' => Bool, 'democracy' => 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' => ChannelAdminRights, 'banned_rights' => ChannelBannedRights, 'participants_count' => int];

PWRTelegram json-encoded version:

{"_": "channel", "creator": Bool, "left": Bool, "editor": Bool, "broadcast": Bool, "verified": Bool, "megagroup": Bool, "restricted": Bool, "democracy": 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": ChannelAdminRights, "banned_rights": ChannelBannedRights, "participants_count": int}

Or, if you're into Lua:

channel={_='channel', creator=Bool, left=Bool, editor=Bool, broadcast=Bool, verified=Bool, megagroup=Bool, restricted=Bool, democracy=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=ChannelAdminRights, banned_rights=ChannelBannedRights, participants_count=int}