Members
Methods
connect(uuid, callback)
Connects to the server and returns the connection data.
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.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
raw |
Object
|
The data to send.
|
Returns:
- Type:
-
String
- Encrypted string.
decrypt(raw) → {String}
Decrypts the incoming data.
Parameters:
Name | Type | Description |
---|---|---|
raw |
String
|
Encrypted data. |
Returns:
- Type:
-
String
- Decrypted string.
decryptJSON(raw) → {Object}
Decrypts an encrypted JSON object.
Parameters:
Name | Type | Description |
---|---|---|
raw |
String
|
Encrypted data. |
Returns:
- Type:
-
Object
- Decrypted JSON.
encrypt(raw) → {String}
Encrypts the incoming data.
Parameters:
Name | Type | Description |
---|---|---|
raw |
String
|
Decrypted data. |
Returns:
- Type:
-
String
- Encrypted string.
isVerification(data) → {Boolean}
Validation UUID format string.
Parameters:
Name | Type | Description |
---|---|---|
data |
String
|
The string to check. |
Returns:
- Type:
-
Boolean
mergerString(raw) → {String}
Merge and convert a string.
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.
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
raw |
Object
|
The data to send.
|
|||||||||
callback |
requestCallback
|
The callback that handles the response. |