Skip to content

export abstract Class

ChatBase ​

extends ​

BaseClass<ChatBase.T, ChatBase.P>

Constructor ​

ts
new ChatBase( client, packet )
ParameterTypeDescription
clientClient
packet?ChatBase.P

Properties ​

readonly client : Client ​

id : number ​

message_thread_id? : number ​

Methods ​

createMessageCollector( options ) ​

Creates a message collector to the current chat.

ParameterTypeDescription
optionsMessageCollectorOptionsThe options for the collector.

Returns: MessageCollector

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>