Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/mtkruto/tl/2_types.ts>Channel_

Cross-runtime JavaScript library for building Telegram clients
Go to Latest
class Channel_
extends _Chat_
import { Channel_ } from "https://deno.land/x/mtkruto@0.1.190/tl/2_types.ts";

Channel/supergroup info

Constructors

new
Channel_(params: { creator?: true; left?: true; broadcast?: true; verified?: true; megagroup?: true; restricted?: true; signatures?: true; min?: true; scam?: true; has_link?: true; has_geo?: true; slowmode_enabled?: true; call_active?: true; call_not_empty?: true; fake?: true; gigagroup?: true; noforwards?: true; join_to_send?: true; join_request?: true; forum?: true; stories_hidden?: true; stories_hidden_min?: true; stories_unavailable?: true; id: bigint; access_hash?: bigint; title: string; username?: string; photo: enums.ChatPhoto; date: number; restriction_reason?: Array<enums.RestrictionReason>; admin_rights?: enums.ChatAdminRights; banned_rights?: enums.ChatBannedRights; default_banned_rights?: enums.ChatBannedRights; participants_count?: number; usernames?: Array<enums.Username>; stories_max_id?: number; color?: enums.PeerColor; profile_color?: enums.PeerColor; emoji_status?: enums.EmojiStatus; level?: number; })

Properties

protected
readonly
[id]: number
protected
readonly
[params]: Params
optional
access_hash: bigint

Access hash

optional
admin_rights: enums.ChatAdminRights

Admin rights of the user in this channel (see rights)

optional
banned_rights: enums.ChatBannedRights

Banned rights of the user in this channel (see rights)

optional
broadcast: true

Is this a channel?

optional
call_active: true

Whether a group call or livestream is currently active

optional
call_not_empty: true

Whether there's anyone in the group call or livestream

optional
color: enums.PeerColor

The channel's accent color.

optional
creator: true

Whether the current user is the creator of this channel

date: number

Date when the user joined the supergroup/channel, or if the user isn't a member, its creation date

optional
default_banned_rights: enums.ChatBannedRights

Default chat rights (see rights)

optional
emoji_status: enums.EmojiStatus
optional
fake: true

If set, this supergroup/channel was reported by many users as a fake or scam: be careful when interacting with it.

optional
forum: true

Whether this supergroup is a forum

optional
gigagroup: true

Whether this supergroup is a gigagroup

optional
has_geo: true

Whether this chanel has a geoposition

id: bigint

ID of the channel

optional
join_request: true

Whether a user's join request will have to be approved by administrators, toggle using channels.toggleJoinToSend

optional
join_to_send: true

Whether a user needs to join the supergroup before they can send messages: can be false only for discussion groups », toggle using channels.toggleJoinToSend

optional
left: true

Whether the current user has left or is not a member of this channel

optional
level: number
optional
megagroup: true

Is this a supergroup?

optional
min: true

See min

optional
noforwards: true

Whether this channel or group is protected, thus does not allow forwarding messages from it

optional
participants_count: number

Participant count

photo: enums.ChatPhoto

Profile photo

optional
profile_color: enums.PeerColor

The channel's profile color.

optional
restricted: true

Whether viewing/writing in this channel for a reason (see restriction_reason

optional
restriction_reason: Array<enums.RestrictionReason>

Contains the reason why access to this channel must be restricted.

optional
scam: true

This channel/supergroup is probably a scam

optional
signatures: true

Whether signatures are enabled (channels)

optional
slowmode_enabled: true

Whether slow mode is enabled for groups to prevent flood in chat

optional
stories_hidden: true
optional
stories_hidden_min: 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.getChannels to obtain the latest value of the stories_hidden flag.

optional
stories_max_id: number

ID of the maximum read story.

optional
stories_unavailable: true

No stories from the channel are visible.

title: string

Title

optional
username: string

Username

optional
usernames: Array<enums.Username>

Additional usernames

optional
verified: true

Is this channel verified by telegram?

Static Properties

readonly
[name]: string
readonly
[paramDesc]: ParamDesc