Class: Client

Client()

new Client()

Source:

Methods

(static) assignDialog(dialog_id, dialog) → {Promise}

Assign dialog
Parameters:
Name Type Description
dialog_id Number Dialog id
dialog Object Dialog object
Source:
Throws:
Error
Returns:
Type
Promise

(static) closeDialog(dialog_id) → {Promise}

Close dialog
Parameters:
Name Type Description
dialog_id Number Dialog id
Source:
Throws:
Error
Returns:
Type
Promise

(static) deleteCommand(command_name) → {Promise}

Delete bot command
Parameters:
Name Type Description
command_name string Command name
Source:
Throws:
Error
Returns:
Type
Promise

(static) deleteMessage(message_id) → {Promise}

Delete message
Parameters:
Name Type Description
message_id Number Message id
Source:
Throws:
Error
Returns:
Type
Promise

(static) editCommand(command_name, command) → {Promise}

Edit bot command
Parameters:
Name Type Description
command_name string Command name
command Object Command object
Source:
Throws:
Error
Returns:
Type
Promise

(static) editMessage(message_id, message) → {Promise}

Edit message
Parameters:
Name Type Description
message_id Number Message id
message Object Message object
Source:
Throws:
Error
Returns:
Type
Promise

(static) filesUpload(data) → {Promise}

Upload file
Parameters:
Name Type Description
data string Binary data
Source:
Throws:
Error
Returns:
Type
Promise

(static) filesUploadByUrl(url) → {Promise}

Upload file by url
Parameters:
Name Type Description
url string File url address
Source:
Throws:
Error
Returns:
Type
Promise

(static) getBots(params) → {Promise}

Get bots
Parameters:
Name Type Description
params Object Filter's object for bots
Source:
Returns:
Type
Promise

(static) getChannels(params) → {Promise}

Get channels
Parameters:
Name Type Description
params Object Filter's object for channels
Source:
Returns:
Type
Promise

(static) getChats(params) → {Promise}

Get chats
Parameters:
Name Type Description
params Object Filter's object for chats
Source:
Returns:
Type
Promise

(static) getCommands(params) → {Promise}

Get bot commands
Parameters:
Name Type Description
params Object Filter's object for commands
Source:
Returns:
Type
Promise

(static) getCustomers(params) → {Promise}

Get customers
Parameters:
Name Type Description
params Object Filter's object for customers
Source:
Returns:
Type
Promise

(static) getDialogs(params) → {Promise}

Get dialogs
Parameters:
Name Type Description
params Object Filter's object for dialogs
Source:
Returns:
Type
Promise

(static) getFile(file_id) → {Promise}

Get file information
Parameters:
Name Type Description
file_id string File identifier
Source:
Throws:
Error
Returns:
Type
Promise

(static) getMembers(params) → {Promise}

Get members
Parameters:
Name Type Description
params Object Filter's object for members
Source:
Returns:
Type
Promise

(static) getMessages(params) → {Promise}

Get messages
Parameters:
Name Type Description
params Object Filter's object for messages
Source:
Returns:
Type
Promise

(static) getUsers(params) → {Promise}

Get users
Parameters:
Name Type Description
params Object Filter's object for users
Source:
Returns:
Type
Promise

(static) getWebsocketData(events) → {Map}

Get websocket url
Parameters:
Name Type Description
events array.<string> Array of strings with websocket events
Source:
Throws:
Error
Returns:
Type
Map

(static) info(data) → {Promise}

Bot information update
Parameters:
Name Type Description
data Object Bot data
Source:
Returns:
Type
Promise

(static) sendMessage(message) → {Promise}

Send message
Parameters:
Name Type Description
message Object Message object
Source:
Returns:
Type
Promise

(static) unassignDialog(dialog_id) → {Promise}

Unassign dialog
Parameters:
Name Type Description
dialog_id Number Dialog id
Source:
Throws:
Error
Returns:
Type
Promise