Members
Methods
_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.
    
_merger(raw) → {String}
    Merge and convert a string.
    Parameters:
| Name | Type | Description | 
|---|---|---|
raw | 
            
            
            
                
String
            
             | 
            
            
            The string to convert. | 
Returns:
- Type:
 - 
        
String 
    - The converted string.
    
_verification(data) → {Boolean}
    Validation UUID format string.
    Parameters:
| Name | Type | Description | 
|---|---|---|
data | 
            
            
            
                
String
            
             | 
            
            
            The string to check. | 
Returns:
- Type:
 - 
        
Boolean 
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. | 
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. |