canopy/www/doc/client/commandPreprocessor.html

1921 lines
20 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Class: commandPreprocessor</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Class: commandPreprocessor</h1>
<section>
<header>
<h2><span class="attribs"><span class="type-signature"></span></span>commandPreprocessor<span class="signature">(client)</span><span class="type-signature"></span></h2>
<div class="class-description">Class containing chat and command pre-processing logic</div>
</header>
<article>
<div class="container-overview">
<h2>Constructor</h2>
<h4 class="name" id="commandPreprocessor"><span class="type-signature"></span>new commandPreprocessor<span class="signature">(client)</span><span class="type-signature"></span></h4>
<div class="description">
Instantiates a new commandPreprocessor object
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>client</code></td>
<td class="type">
<span class="param-type"><a href="channel.html">channel</a></span>
</td>
<td class="description last">Parent client Management Object</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line20">line 20</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="client"><span class="type-signature"></span>client<span class="type-signature"></span></h4>
<div class="description">
Parent Client Management object
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line29">line 29</a>
</li></ul></dd>
</dl>
<h4 class="name" id="commandProcessor"><span class="type-signature"></span>commandProcessor<span class="type-signature"></span></h4>
<div class="description">
Child Command Processor object
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line34">line 34</a>
</li></ul></dd>
</dl>
<h4 class="name" id="emotes"><span class="type-signature"></span>emotes<span class="type-signature"></span></h4>
<div class="description">
Set of arrays containing site-wide, channel-wide, and user-specific emotes
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line39">line 39</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="buildAutocompleteDictionary"><span class="type-signature"></span>buildAutocompleteDictionary<span class="signature">()</span><span class="type-signature"> &rarr; {Object}</span></h4>
<div class="description">
Generates auto-complete dictionary from pre-written commands, emotes, and used tokes from servers for use with autocomplete
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line241">line 241</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
Generated Dictionary object
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="defineListeners"><span class="type-signature"></span>defineListeners<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Defines Network-Related Listeners
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line52">line 52</a>
</li></ul></dd>
</dl>
<h4 class="name" id="getEmoteByLink"><span class="type-signature"></span>getEmoteByLink<span class="signature">(link)</span><span class="type-signature"> &rarr; {Object}</span></h4>
<div class="description">
Fetches emote by link
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>link</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Link to fetch emote with</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line197">line 197</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
found emote
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Object</span>
</dd>
</dl>
<h4 class="name" id="getEmoteNames"><span class="type-signature"></span>getEmoteNames<span class="signature">()</span><span class="type-signature"> &rarr; {Array}</span></h4>
<div class="description">
Generates flat list of emote names
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line220">line 220</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
List of strings containing emote names
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Array</span>
</dd>
</dl>
<h4 class="name" id="preprocess"><span class="type-signature"></span>preprocess<span class="signature">(command)</span><span class="type-signature"></span></h4>
<div class="description">
Pre-Processes a single chat/command before sending it off to the server
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>command</code></td>
<td class="type">
<span class="param-type">String</span>
</td>
<td class="description last">Chat/Command to pre-process</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line64">line 64</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processEmotes"><span class="type-signature"></span>processEmotes<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes emotes refrences in loaded message into links to be further processed by processLinks()
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line111">line 111</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processLinks"><span class="type-signature"></span>processLinks<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes links into numbered file seperators, putting links into a dedicated array.
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line128">line 128</a>
</li></ul></dd>
</dl>
<h4 class="name" id="processLocalCommand"><span class="type-signature"></span>processLocalCommand<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Processes local commands, starting with '/'
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line88">line 88</a>
</li></ul></dd>
</dl>
<h4 class="name" id="sendRemoteCommand"><span class="type-signature"></span>sendRemoteCommand<span class="signature">()</span><span class="type-signature"></span></h4>
<div class="description">
Transmits message/command off to server
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line156">line 156</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setChanEmotes"><span class="type-signature"></span>setChanEmotes<span class="signature">(data)</span><span class="type-signature"></span></h4>
<div class="description">
Sets channel emotes
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Emote data from server</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line172">line 172</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setPersonalEmotes"><span class="type-signature"></span>setPersonalEmotes<span class="signature">(data)</span><span class="type-signature"></span></h4>
<div class="description">
Sets personal emotes
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Emote data from server</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line180">line 180</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setSiteEmotes"><span class="type-signature"></span>setSiteEmotes<span class="signature">(data)</span><span class="type-signature"></span></h4>
<div class="description">
Sets site emotes
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Emote data from server</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line164">line 164</a>
</li></ul></dd>
</dl>
<h4 class="name" id="setUsedTokes"><span class="type-signature"></span>setUsedTokes<span class="signature">(data)</span><span class="type-signature"></span></h4>
<div class="description">
Sets used tokes
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last">Used toke data from server</td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="commandPreprocessor.js.html">commandPreprocessor.js</a>, <a href="commandPreprocessor.js.html#line188">line 188</a>
</li></ul></dd>
</dl>
</article>
</section>
</div>
<nav>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="addURLPopup.html">addURLPopup</a></li><li><a href="cPanel.html">cPanel</a></li><li><a href="channel.html">channel</a></li><li><a href="chatBox.html">chatBox</a></li><li><a href="chatPostprocessor.html">chatPostprocessor</a></li><li><a href="clearPopup.html">clearPopup</a></li><li><a href="commandPreprocessor.html">commandPreprocessor</a></li><li><a href="commandProcessor.html">commandProcessor</a></li><li><a href="defaultTitlesPopup.html">defaultTitlesPopup</a></li><li><a href="emotePanel.html">emotePanel</a></li><li><a href="hlsBase.html">hlsBase</a></li><li><a href="hlsLiveStreamHandler.html">hlsLiveStreamHandler</a></li><li><a href="mediaHandler.html">mediaHandler</a></li><li><a href="newPlaylistPopup.html">newPlaylistPopup</a></li><li><a href="nullHandler.html">nullHandler</a></li><li><a href="panelObj.html">panelObj</a></li><li><a href="player.html">player</a></li><li><a href="playlistManager.html">playlistManager</a></li><li><a href="poppedPanel.html">poppedPanel</a></li><li><a href="queuePanel.html">queuePanel</a></li><li><a href="rawFileBase.html">rawFileBase</a></li><li><a href="rawFileHandler.html">rawFileHandler</a></li><li><a href="renamePopup.html">renamePopup</a></li><li><a href="reschedulePopup.html">reschedulePopup</a></li><li><a href="schedulePopup.html">schedulePopup</a></li><li><a href="settingsPanel.html">settingsPanel</a></li><li><a href="userList.html">userList</a></li><li><a href="youtubeEmbedHandler.html">youtubeEmbedHandler</a></li></ul><h3>Global</h3><ul><li><a href="global.html#onYouTubeIframeAPIReady">onYouTubeIframeAPIReady</a></li></ul>
</nav>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 4.0.4</a> on Sat Sep 06 2025 19:07:57 GMT-0400 (Eastern Daylight Time)
</footer>
<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>