Channel/supergroup info
channel#d31a961e flags:# creator:flags.0?true left:flags.2?true broadcast:flags.5?true verified:flags.7?true megagroup:flags.8?true restricted:flags.9?true signatures:flags.11?true min:flags.12?true scam:flags.19?true has_link:flags.20?true has_geo:flags.21?true slowmode_enabled:flags.22?true call_active:flags.23?true call_not_empty:flags.24?true id:int access_hash:flags.13?long title:string username:flags.6?string photo:ChatPhoto date:int version:int restriction_reason:flags.9?Vector<RestrictionReason> admin_rights:flags.14?ChatAdminRights banned_rights:flags.15?ChatBannedRights default_banned_rights:flags.18?ChatBannedRights participants_count:flags.17?int = Chat;
Name | Type | Description |
---|---|---|
flags | # | Flags, see TL conditional fields |
creator | flags.0?true | Whether the current user is the creator of this channel |
left | flags.2?true | Whether the current user has left this channel |
broadcast | flags.5?true | Is this a channel? |
verified | flags.7?true | Is this channel verified by telegram? |
megagroup | flags.8?true | Is this a supergroup? |
restricted | flags.9?true | Whether viewing/writing in this channel for a reason (see restriction_reason |
signatures | flags.11?true | Whether signatures are enabled (channels) |
min | flags.12?true | See min |
scam | flags.19?true | This channel/supergroup is probably a scam |
has_link | flags.20?true | Whether this channel has a private join link |
has_geo | flags.21?true | Whether this chanel has a geoposition |
slowmode_enabled | flags.22?true | Whether slow mode is enabled for groups to prevent flood in chat |
id | int | ID of the channel |
access_hash | flags.13?long | Access hash |
title | string | Title |
username | flags.6?string | Username |
photo | ChatPhoto | Profile photo |
date | int | Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date |
version | int | Version of the channel (always 0 ) |
restriction_reason | flags.9?Vector<RestrictionReason> | Contains the reason why access to this channel must be restricted. |
admin_rights | flags.14?ChatAdminRights | Admin rights of the user in this channel (see rights) |
banned_rights | flags.15?ChatBannedRights | Banned rights of the user in this channel (see rights) |
default_banned_rights | flags.18?ChatBannedRights | Default chat rights (see rights) |
participants_count | flags.17?int | Participant count |
In some situations user and channel constructors have reduced set of fields present (although id is always there) and min flag set.
How to handle admin permissions, granular bans and global permissions in channels, groups and supergroups.