Skip to content

export abstract Class

BaseGroupChat ​

extends ​

BaseChat

implements ​

BaseGroupChatPacket

Constructor ​

ts
 new BaseGroupChat( client, packet )
ParameterTypeDescription
clientClient
packetChatPacket

Properties ​

get partial : boolean ​

accent_color_id? : number ​

active_usernames? : string[] ​

available_reactions? : ReactionType[] ​

background_custom_emoji_id? : string ​

can_send_paid_media? : true ​

can_set_sticker_set? : true ​

readonly client : Client ​

custom_emoji_sticker_set_name? : string ​

description? : string ​

has_aggressive_anti_spam_enabled? : true ​

has_hidden_members? : true ​

has_protected_content? : true ​

has_visible_history? : true ​

id : number ​

invites : ChatInviteLinksManager ​

is_forum? : true ​

join_by_request? : true ​

join_to_send_messages? : true ​

last_message_id? : number ​

default: 0

linked_chat_id? : number ​

location? : ChatLocation ​

max_reaction_count? : number ​

members : MembersManager ​

message_auto_delete_time? : number ​

message_thread_id? : number ​

messages : MessagesManager ​

permissions? : ChatPermissions ​

photo? : ChatPhoto ​

pinned_message? : Message ​

profile_accent_color_id? : number ​

profile_background_custom_emoji_id? : string ​

requests : ChatRequestsManager ​

slow_mode_delay? : number ​

sticker_set_name? : string ​

title? : string ​

type : "group" | "supergroup" | "channel" ​

unrestrict_boost_count? : number ​

username? : string ​

Methods ​

asyncadministrators( ) ​

Get the administrators of the chat.

Returns: Promise<Member[]>

createCallbackCollector( options ) ​

ParameterTypeDescription
options?CallbackCollectorOptionsThe options for the collector.

Creates a callback query collector to the current chat.

Returns: CallbackCollector

createMessageCollector( options ) ​

ParameterTypeDescription
options?MessageCollectorOptionsThe options for the collector.

Creates a message collector to the current chat.

Returns: MessageCollector

asyncdeletePhoto( ) ​

Delete the current photo of the chat.

Returns: Promise<boolean>

asyncdeleteStickerSet( ) ​

Deletes the current set of sticker from the current chat.

Returns: Promise<boolean>

asyncfetch( ) ​

Returns: Promise<boolean | Chat>

asyncleave( ) ​

Returns: Promise<boolean>

asyncsend( method, packet, form ) ​

ParameterTypeDescription
methodMessagePayloadMethodThe method of the message.
packetMessagePayloadThe packet of what the message will contain.
form?FormDataBuilderThe form data for uploading media, see also File .

Sends a message to the current channel.

Returns: Promise<false | Message>

asyncsendInvoice( id ) ​

ParameterTypeDescription
idstringThe id of the invoice.

Sends the stored invoice with the id to the current chat.

Returns: Promise<null | Message>

asyncsendText( text ) ​

ParameterTypeDescription
textstringThe text content of the message.

Sends a text message to the current chat.

Returns: Promise<false | Message>

asyncsetDescription( description ) ​

ParameterTypeDescription
descriptionstringThe new description of the chat.

Set the description of the current chat.

Returns: Promise<boolean>

asyncsetPhoto( photo ) ​

ParameterTypeDescription
photoInputFile

Set the current photo of the chat.

Returns: Promise<boolean>

asyncsetStickerSet( sticker_set_name ) ​

ParameterTypeDescription
sticker_set_namestringThe name of the set of stickers.

Set the sticker set of the current chat.

Returns: Promise<boolean>

asyncsetTitle( title ) ​

ParameterTypeDescription
titlestringThe new title of the chat.

Set the title of the current chat.

Returns: Promise<boolean>

A modern, powerful library for building your Telegram bots, with seamless support for both JavaScript and Typescript.