Skip to content

export Class

PrivateChat ​

extends ​

BaseChat

implements ​

PrivateChatPacket

Constructor ​

ts
new PrivateChat( client, packet )
ParameterTypeDescription
clientClient
packetChatPacket

Properties ​

get partial : boolean ​

bio? : string ​

birthdate? : Birthdate ​

business_intro? : BusinessIntro ​

business_location? : BusinessLocation ​

business_opening_hours? : BusinessOpeningHours ​

readonly client : Client ​

emoji_status_custom_emoji_id? : string ​

emoji_status_expiration_date? : number ​

first_name? : string ​

has_private_forwards? : true ​

has_restricted_voice_and_video_messages? : true ​

id : number ​

last_message_id? : number ​

last_name? : string ​

message_thread_id? : number ​

messages : MessagesManager ​

personal_chat? : Chat ​

photo? : ChatPhoto ​

type : "private" ​

username? : string ​

Methods ​

createMessageCollector( options ) ​

Creates a message collector to the current chat.

ParameterTypeDescription
optionsMessageCollectorOptionsThe options for the collector.

Returns: MessageCollector

asyncdeleteStickerSet( ) ​

Returns: Promise<boolean>

asyncfetch( ) ​

Returns: Promise<boolean | BaseChat>

asyncleave( ) ​

Returns: Promise<boolean>

asyncsend( method, packet, form_data ) ​

Sends a message to the current channel.

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

Returns: Promise<Message>

asyncsendInvoice( id ) ​

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

ParameterTypeDescription
idstringThe id of the invoice.

Returns: Promise<void | Message>

asyncsendText( text ) ​

Sends a text message to the current chat.

ParameterTypeDescription
textstringThe text content of the message.

Returns: Promise<Message>

asyncsetDescription( description ) ​

ParameterTypeDescription
descriptionstring

Returns: Promise<boolean>

asyncsetStrickerSet( sticker_set_name ) ​

ParameterTypeDescription
sticker_set_namestring

Returns: Promise<boolean>

asyncsetTitle( title ) ​

ParameterTypeDescription
titlestring

Returns: Promise<boolean>