Constructor
new commandPreprocessor(client)
Instantiates a new commandPreprocessor object
Parameters:
| Name | Type | Description |
|---|---|---|
client |
channel | Parent client mgmt object |
- Source:
Members
client
Parent Client Management object
- Source:
commandProcessor
Child Command Processor object
- Source:
emotes
Set of arrays containing site-wide, channel-wide, and user-specific emotes
- Source:
Methods
buildAutocompleteDictionary() → {Object}
Generates auto-complete dictionary from pre-written commands, emotes, and used tokes from servers for use with autocomplete
- Source:
Returns:
Generated Dictionary object
- Type
- Object
defineListeners()
Defines Network-Related Listeners
- Source:
getEmoteByLink(link) → {Object}
Fetches emote by link
Parameters:
| Name | Type | Description |
|---|---|---|
link |
String | Link to fetch emote with |
- Source:
Returns:
found emote
- Type
- Object
getEmoteNames() → {Array}
Generates flat list of emote names
- Source:
Returns:
List of strings containing emote names
- Type
- Array
preprocess(command)
Pre-Processes a single chat/command before sending it off to the server
Parameters:
| Name | Type | Description |
|---|---|---|
command |
String | Chat/Command to pre-process |
- Source:
processEmotes()
Processes emotes refrences in loaded message into links to be further processed by processLinks()
- Source:
processLinks()
Processes links into numbered file seperators, putting links into a dedicated array.
- Source:
processLocalCommand()
Processes local commands, starting with '/'
- Source:
sendRemoteCommand()
Transmits message/command off to server
- Source:
setChanEmotes(data)
Sets channel emotes
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Emote data from server |
- Source:
setPersonalEmotes(data)
Sets personal emotes
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Emote data from server |
- Source:
setSiteEmotes(data)
Sets site emotes
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Emote data from server |
- Source:
setUsedTokes(data)
Sets used tokes
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Object | Used toke data from server |
- Source: