export Class
ClientUser ​
extends ​
Constructor ​
ts
new ClientUser( client, packet )
Parameter | Type | Description |
---|---|---|
client | Client | |
packet | UserPacket |
Properties ​
adminsitrator_rights : Object
​
default: ...
readonly client : Client
​
description? : string
​
id : number
​
is_bot? : boolean
​
language_code? : string
​
menu_button : Object
​
default: {}
message_thread_id? : number
​
name? : string
​
short_description? : string
​
Methods ​
asyncboosts( chat_id ) ​
Parameter | Type | Description |
---|---|---|
chat_id | number |
Returns:
Promise
<boolean
|ChatBoost[]
>
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
asyncget( ) ​
Returns:
Promise
<ClientUser
>
asyncgetBusinessConnection( business_connection_id ) ​
Parameter | Type | Description |
---|---|---|
business_connection_id | string |
Returns:
Promise
<BusinessConnectionPacket
>
asyncgetChatMenuButton( chat_id, force ) ​
Parameter | Type | Description |
---|---|---|
chat_id? | number | |
force? | boolean |
Returns:
Promise
<ChatMenuButton
>
asyncgetProfilePhotos( offset, limit ) ​
Parameter | Type | Description |
---|---|---|
offset? | number | |
limit? | number |
Returns:
Promise
<UserProfilePhotos
>
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
>
asyncsetDefaultAdministratorRights( rights, for_channels ) ​
Parameter | Type | Description |
---|---|---|
rights | ChatAdministratorRights | |
for_channels? | boolean |
Returns:
Promise
<boolean
>
asyncsetDescription( description, language_code ) ​
Parameter | Type | Description |
---|---|---|
description | string | |
language_code? | string |
Returns:
Promise
<boolean
>
asyncsetMenuButton( menu_button, chat_id ) ​
Parameter | Type | Description |
---|---|---|
menu_button? | string | MenuButtonBuilder | |
chat_id? | number |
Returns:
Promise
<boolean
>
asyncsetName( name, language_code ) ​
Parameter | Type | Description |
---|---|---|
name | string | |
language_code? | string |
Returns:
Promise
<boolean
>
asyncsetShortDescription( short_description, language_code ) ​
Parameter | Type | Description |
---|---|---|
short_description | string | |
language_code? | string |
Returns:
Promise
<boolean
>