Collects data on users.i.e. last seen, a buffer of messages etc. 
TBD. needs more work due to size of data and finding a useful reason (from a streamers perspective)
Awaiting requests for what it should do before advancing the extension
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
Methods
    SaveConfigToServer()
    Sends our config to the server to be saved for next time we run
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    SaveDataToServer()
    Save our data to the server
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    send some modal code to be displayed on the admin page
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | tochannel | String |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    (async) getTwitchBotStatusList()
    Update our know twitch bot list
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    getUserIDData(username)
    sends action_TwitchGetUser to twitch extension to get user data back
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | username | string |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    heartBeatCallback()
    Sends out heartbeat messages so other extensions can see our status
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    initialise(app, host, port, heartbeat)
    Starts the extension using the given data.
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | app | object:Express |  | 
        
        
            
            | host | string |  | 
        
        
            
            | port | number |  | 
        
        
            
            | heartbeat | number |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    onDataCenterConnect(socket)
    Connection message handler
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | socket | * |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    onDataCenterDisconnect(reason)
    Disconnection message sent from the server
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | reason | String |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    onDataCenterMessage(server_packet)
    receives message from the socket
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | server_packet | data |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    postStartupActions()
    At this point we should have any config/credentials loaded
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    pruneUsers(platform)
    Prune the data to keep data sizes manageable
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | platform | string |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    sendNewUserTrigger(data)
    sends trigger_NewChatter message
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | data | object |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    (async) setTwitchBotStatus(name)
    Update user data based on known bot list
Parameters:
    
        
            
            | Name | Type | Description | 
    
    
        
        
            
            | name | string |  | 
        
    
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
- 
            
        
    startupCheck()
    waits for config and credentials files to set ready flag
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        - Source:
-