export Class
PrivateChat ​
extends ​
implements ​
Constructor ​
ts
new PrivateChat( client, packet )| Parameter | Type | Description |
|---|---|---|
client | Client | |
packet | ChatPacket |
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 ​
default: 0
last_name? : string ​
message_thread_id? : number ​
messages : MessagesManager ​
personal_chat? : Chat ​
photo? : ChatPhoto ​
type : "private" ​
username? : string ​
Methods ​
createCallbackCollector( options ) ​
| Parameter | Type | Description |
|---|---|---|
options? | CallbackCollectorOptions | The options for the collector. |
Creates a callback query collector to the current chat.
Returns:
CallbackCollector
createMessageCollector( options ) ​
| Parameter | Type | Description |
|---|---|---|
options? | MessageCollectorOptions | The options for the collector. |
Creates a message collector to the current chat.
Returns:
MessageCollector
asyncfetch( ) ​
Returns:
Promise<boolean|Chat>
asyncleave( ) ​
Returns:
Promise<boolean>
asyncsend( method, packet, form ) ​
| Parameter | Type | Description |
|---|---|---|
method | MessagePayloadMethod | The method of the message. |
packet | MessagePayload | The packet of what the message will contain. |
form? | FormDataBuilder | The form data for uploading media, see also File . |
Sends a message to the current channel.
Returns:
Promise<false|Message>
asyncsendInvoice( id ) ​
| Parameter | Type | Description |
|---|---|---|
id | string | The id of the invoice. |
Sends the stored invoice with the id to the current chat.
Returns:
Promise<null|Message>
asyncsendText( text ) ​
| Parameter | Type | Description |
|---|---|---|
text | string | The text content of the message. |
Sends a text message to the current chat.
Returns:
Promise<false|Message>