Layer 220
constructor

Parameters

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 or is not a member of 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? Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
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 Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
HasLink flags.20?true Whether 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 channel Full. linked_chat_id. Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
HasGeo flags.21?true Whether this chanel has a geoposition
SlowmodeEnabled flags.22?true Whether slow mode is enabled for groups to prevent flood in chat. Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
CallActive flags.23?true Whether a group call or livestream is currently active
CallNotEmpty flags.24?true Whether there's anyone in the group call or livestream
Fake flags.25?true If 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 channel Full cache for this channel/supergroup ID, see here for more info.
Gigagroup flags.26?true Whether this supergroup is a gigagroup Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
Noforwards flags.27?true Whether this channel or group is protected, thus does not allow forwarding messages from it
JoinToSend flags.28?true Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups, toggle using channels. toggle Join To Send Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
JoinRequest flags.29?true Whether a user's join request will have to be approved by administrators, toggle using channels. toggle Join To Send Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
Forum flags.30?true Whether this supergroup is a forum. Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
Flags2 # Flags, see TL conditional fields
StoriesHidden flags2.1?true Whether we have hidden all stories posted by this channel.
StoriesHiddenMin flags2.2?true If 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. get Channels to obtain the latest value of the stories_hidden flag.
StoriesUnavailable flags2.3?true No stories from the channel are visible.
SignatureProfiles flags2.12?true If set, messages sent by admins to this channel will link to the admin's profile (just like with groups).
Autotranslation flags2.15?true If set, autotranslation was enabled for all users by the admin of the channel, as specified here.
BroadcastMessagesAllowed flags2.16?true If set, this channel has an associated monoforum, and its ID is specified in the linked_monoforum_id flag.
Monoforum flags2.17?true If set, this is a monoforum, and the ID of the associated channel is specified in the linked_monoforum_id.
ForumTabs flags2.19?true If set, enables the tabbed forum UI.
Id long ID of the channel, see here for more info and the available ID range.
AccessHash flags.13?long Access hash, see here for more info
Title string Title
Username flags.6?string Main active 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
RestrictionReason Vector<RestrictionReason> Contains the reason why access to this channel must be restricted. Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
AdminRights flags.14?ChatAdminRights Admin rights of the user in this channel (see rights )
BannedRights flags.15?ChatBannedRights Banned rights of the user in this channel (see rights )
DefaultBannedRights flags.18?ChatBannedRights Default chat rights (see rights )
ParticipantsCount flags.17?int Participant count
Usernames flags2.0?Vector<Username> Additional usernames
StoriesMaxId flags2.4?int ID of the maximum read story.
Color flags2.7?PeerColor The channel's accent color.
ProfileColor flags2.8?PeerColor The channel's profile color.
EmojiStatus flags2.9?EmojiStatus Emoji status
Level flags2.10?int Boost level. Changes to this flag should invalidate the local channel Full cache for this channel/supergroup ID, see here for more info.
SubscriptionUntilDate flags2.11?int Expiration date of the Telegram Star subscription the current user has bought to gain access to this channel.
BotVerificationIcon flags2.13?long Describes a bot verification icon.
SendPaidMessagesStars flags2.14?long If 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 channel Full. 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).
LinkedMonoforumId flags2.18?long For channels with associated monoforums, the monoforum ID. For Monoforums, the ID of the associated channel.

Returns

Chat

Gogram Example

// Creating Channel constructor
obj := &tg.Channel{
    StoriesHidden: nil,
    StoriesHiddenMin: nil,
    StoriesUnavailable: nil,
    SignatureProfiles: nil,
    Autotranslation: nil,
    BroadcastMessagesAllowed: nil,
    // ... more required fields

    // Optional fields:
    // Creator: true,
    // Left: true,
    // Broadcast: true,
    // Verified: true,
    // ... more optional fields
}