Skip to main content

channel

Channel/supergroup info When updating the local peer database, all fields from the newly received constructor take priority over the old constructor cached locally (including by removing fields that aren't set in the new constructor). The only exception to the above rule is when the min flag is set, in which case only the following fields must be applied over any locally stored version: See here » for an implementation of the logic to use when updating the local user peer database.

type tg.Channel struct { /* ... */ }

Implements Chat.

Fields

NameTypeRequiredDescription
CreatorboolWhether the current user is the creator of this channel
LeftboolWhether the current user has left or is not a member of this channel
BroadcastboolIs this a channel?
VerifiedboolIs this channel verified by telegram?
MegagroupboolIs this a supergroup? Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
RestrictedboolWhether viewing/writing in this channel for a reason (see restriction_reason)
SignaturesboolWhether signatures are enabled (channels)
MinboolSee min
ScamboolThis channel/supergroup is probably a scam Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
HasLinkboolWhether this channel has a linked discussion group » (or this supergroup is a channel's discussion group). The actual ID of the linked channel/supergroup is contained in channelFull.linked_chat_id. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
HasGeoboolWhether this chanel has a geoposition
SlowmodeEnabledboolWhether slow mode is enabled for groups to prevent flood in chat. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
CallActiveboolWhether a group call or livestream is currently active
CallNotEmptyboolWhether there's anyone in the group call or livestream
FakeboolIf set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
GigagroupboolWhether this supergroup is a gigagroupChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
NoforwardsboolWhether this channel or group is protected, thus does not allow forwarding messages from it
JoinToSendboolWhether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSendChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
JoinRequestboolWhether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSendChanges to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
ForumboolWhether this supergroup is a forum. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
Flags2bin.FieldsyesFlags, see TL conditional fields
StoriesHiddenboolWhether we have hidden all stories posted by this channel ».
StoriesHiddenMinboolIf set, indicates that the stories_hidden flag was not populated, and its value must cannot be relied on; use the previously cached value, or re-fetch the constructor using channels.getChannels to obtain the latest value of the stories_hidden flag.
StoriesUnavailableboolNo stories from the channel are visible.
SignatureProfilesboolIf set, messages sent by admins to this channel will link to the admin's profile (just like with groups).
AutotranslationboolIf set, autotranslation was enabled for all users by the admin of the channel, as specified here ».
BroadcastMessagesAllowedboolIf set, this channel has an associated monoforum », and its ID is specified in the linked_monoforum_id flag.
MonoforumboolIf set, this is a monoforum », and the ID of the associated channel is specified in the linked_monoforum_id.
ForumTabsboolIf set, enables the tabbed forum UI ».
IDint64yesID of the channel, see here » for more info and the available ID range.
AccessHashint64Access hash, see here » for more info
TitlestringyesTitle
UsernamestringMain active username.
PhotoChatPhotoClassyesProfile photo
DateintyesDate when the user joined the supergroup/channel, or if the user isn't a member, its creation date
RestrictionReason[]RestrictionReasonContains the reason why access to this channel must be restricted. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
AdminRightsChatAdminRightsAdmin rights of the user in this channel (see rights)
BannedRightsChatBannedRightsBanned rights of the user in this channel (see rights)
DefaultBannedRightsChatBannedRightsDefault chat rights (see rights)
ParticipantsCountintParticipant count
Usernames[]UsernameAdditional usernames
StoriesMaxIDRecentStoryID of the maximum read story.
ColorPeerColorClassThe channel's accent color.
ProfileColorPeerColorClassThe channel's profile color.
EmojiStatusEmojiStatusClassEmoji status
LevelintBoost level. Changes to this flag should invalidate the local channelFull cache for this channel/supergroup ID, see here » for more info.
SubscriptionUntilDateintExpiration date of the Telegram Star subscription » the current user has bought to gain access to this channel.
BotVerificationIconint64Describes a bot verification icon ».
SendPaidMessagesStarsint64If set, this supergroup or monoforum has enabled paid messages », we might need to pay the specified amount of Stars to send messages to it, depending on the configured exceptions: check channelFull.send_paid_messages_stars to see if the currently logged in user actually has to pay or not, see here » for the full flow (only set for the monoforum, not the associated channel).
LinkedMonoforumIDint64For channels with associated monoforums, the monoforum ID. For Monoforums, the ID of the associated channel.

References