export Class
User ​
extends ​
implements ​
Constructor ​
ts
new User( client, packet )
Parameter | Type | Description |
---|---|---|
client | Client | |
packet | UserPacket |
Properties ​
added_to_attachment_menu? : boolean
​
can_connect_to_business? : boolean
​
can_read_all_group_messages? : boolean
​
readonly client : Client
​
first_name? : string
​
has_main_web_app? : boolean
​
id : number
​
is_bot? : boolean
​
is_premium? : boolean
​
language_code? : string
​
last_name? : string
​
message_thread_id? : number
​
supports_inline_queries? : boolean
​
username? : string
​
Methods ​
asyncboosts( chat_id ) ​
Parameter | Type | Description |
---|---|---|
chat_id | number |
Returns: Promise
<boolean
| ChatBoost[]
>
createMessageCollector( options ) ​
Creates a message collector to the current chat.
Parameter | Type | Description |
---|---|---|
options | MessageCollectorOptions | The options for the collector. |
Returns: MessageCollector
asyncgetProfilePhotos( offset, limit ) ​
Parameter | Type | Description |
---|---|---|
offset? | number | |
limit? | number |
Returns: Promise
<UserProfilePhotos
>
asyncsend( method, packet, form_data ) ​
Sends a message to the current channel.
Parameter | Type | Description |
---|---|---|
method | MessagePayloadMethod | The method of the message. |
packet | MessagePayload | The packet of what the message will contain. |
form_data? | FormDataBuilder | The form data for uploading media, see also File |
Returns: Promise
<Message
>
asyncsendInvoice( id ) ​
Sends the stored invoice with the id to the current chat.
Parameter | Type | Description |
---|---|---|
id | string | The id of the invoice. |
Returns: Promise
<void
| Message
>
asyncsendText( text ) ​
Sends a text message to the current chat.
Parameter | Type | Description |
---|---|---|
text | string | The text content of the message. |
Returns: Promise
<Message
>