Global

Members

http

Author:
License:
  • See LICENSE.md file included in this distribution.
Source:

Methods

connect(uuid, callback)

Connects to the server and returns the connection data.
Source:
Parameters:
Name Type Description
uuid String The bot UUID.
callback requestCallback The callback that handles the response.

createPackage(raw) → {String}

Creates an encrypted package to send.
Source:
Parameters:
Name Type Description
raw Object The data to send.
Name Type Description
cuid String Session identifier.
text String Message text.
Returns:
Type:
String
- Encrypted string.

decrypt(raw) → {String}

Decrypts the incoming data.
Source:
Parameters:
Name Type Description
raw String Encrypted data.
Returns:
Type:
String
- Decrypted string.

decryptJSON(raw) → {Object}

Decrypts an encrypted JSON object.
Source:
Parameters:
Name Type Description
raw String Encrypted data.
Returns:
Type:
Object
- Decrypted JSON.

encrypt(raw) → {String}

Encrypts the incoming data.
Source:
Parameters:
Name Type Description
raw String Decrypted data.
Returns:
Type:
String
- Encrypted string.

isVerification(data) → {Boolean}

Validation UUID format string.
Source:
Parameters:
Name Type Description
data String The string to check.
Returns:
Type:
Boolean

mergerString(raw) → {String}

Merge and convert a string.
Source:
Parameters:
Name Type Description
raw String The string to convert.
Returns:
Type:
String
- The converted string.

send(raw, callback)

Send a message to the server and return a response.
Source:
Parameters:
Name Type Description
raw Object The data to send.
Name Type Description
cuid String Session identifier.
text String Message text.
callback requestCallback The callback that handles the response.