@mkody/twitch-emoticons
Version:
Gets Twitch, BTTV, FFZ and 7TV emotes as well as parsing text to emotes!
3,506 lines (928 loc) • 51.8 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>EmoteFetcher - Documentation</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.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
<script src="scripts/nav.js" defer></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
<div class="navicon"></div>
</label>
<label for="nav-trigger" class="overlay"></label>
<nav >
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="BTTVEmote.html">BTTVEmote</a><ul class='methods'><li data-type='method'><a href="BTTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="BTTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="BTTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="Channel.html">Channel</a><ul class='methods'><li data-type='method'><a href="Channel.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="Channel.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="Channel.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li></ul></li><li><a href="Collection.html">Collection</a><ul class='methods'><li data-type='method'><a href="Collection.html#filter">filter</a></li><li data-type='method'><a href="Collection.html#find">find</a></li><li data-type='method'><a href="Collection.html#map">map</a></li></ul></li><li><a href="Emote.html">Emote</a><ul class='methods'><li data-type='method'><a href="Emote.html#toObject">toObject</a></li></ul></li><li><a href="EmoteFetcher.html">EmoteFetcher</a><ul class='methods'><li data-type='method'><a href="EmoteFetcher.html#_cacheBTTVEmote">_cacheBTTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheFFZEmote">_cacheFFZEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheSevenTVEmote">_cacheSevenTVEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_cacheTwitchEmote">_cacheTwitchEmote</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawBTTVEmotes">_getRawBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmoteSet">_getRawFFZEmoteSet</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawFFZEmotes">_getRawFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawSevenTVEmotes">_getRawSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_getRawTwitchEmotes">_getRawTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#_setupChannel">_setupChannel</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchBTTVEmotes">fetchBTTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchFFZEmotes">fetchFFZEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchSevenTVEmotes">fetchSevenTVEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fetchTwitchEmotes">fetchTwitchEmotes</a></li><li data-type='method'><a href="EmoteFetcher.html#fromObject">fromObject</a></li></ul></li><li><a href="EmoteParser.html">EmoteParser</a><ul class='methods'><li data-type='method'><a href="EmoteParser.html#parse">parse</a></li></ul></li><li><a href="FFZEmote.html">FFZEmote</a><ul class='methods'><li data-type='method'><a href="FFZEmote.html#toLink">toLink</a></li><li data-type='method'><a href="FFZEmote.html#toObject">toObject</a></li><li data-type='method'><a href="FFZEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="SevenTVEmote.html">SevenTVEmote</a><ul class='methods'><li data-type='method'><a href="SevenTVEmote.html#toLink">toLink</a></li><li data-type='method'><a href="SevenTVEmote.html#toObject">toObject</a></li><li data-type='method'><a href="SevenTVEmote.html#.fromObject">fromObject</a></li></ul></li><li><a href="TwitchEmote.html">TwitchEmote</a><ul class='methods'><li data-type='method'><a href="TwitchEmote.html#toLink">toLink</a></li><li data-type='method'><a href="TwitchEmote.html#toObject">toObject</a></li><li data-type='method'><a href="TwitchEmote.html#.fromObject">fromObject</a></li></ul></li></ul>
</nav>
<div id="main">
<h1 class="page-title">EmoteFetcher</h1>
<section>
<header>
<h2>
EmoteFetcher
</h2>
</header>
<article>
<div class="container-overview">
<h4 class="name" id="EmoteFetcher"><span class="type-signature"></span>new EmoteFetcher<span class="signature">(clientId, clientSecret, options)</span><span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Fetches and caches emotes.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line21">line 21</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">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>clientId</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The client id for the twitch api.</p></td>
</tr>
<tr>
<td class="name"><code>clientSecret</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The client secret for the twitch api.</p></td>
</tr>
<tr>
<td class="name"><code>options</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>Additional options.</p>
<h6>Properties</h6>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>apiClient</code></td>
<td class="type">
<span class="param-type">ApiClient</span>
</td>
<td class="description last"><p>Bring your own Twurple ApiClient.</p></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id="apiClient"><span class="type-signature"></span>apiClient<span class="type-signature"></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Twitch api client.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line30">line 30</a>
</li></ul></dd>
</dl>
<div class="description usertext">
<p>Twitch api client.</p>
</div>
<h4 class="name" id="channels"><span class="type-signature"></span>channels<span class="type-signature"> :<a href="Collection.html">Collection</a>.<string, <a href="Channel.html">Channel</a>></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Cached channels.<br>
Collectionped by name to Channel instance.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line45">line 45</a>
</li></ul></dd>
</dl>
<div class="description usertext">
<p>Cached channels.<br>
Collectionped by name to Channel instance.</p>
</div>
<h5 class="h5-types">Type:</h5>
<ul>
<li>
<span class="param-type"><a href="Collection.html">Collection</a>.<string, <a href="Channel.html">Channel</a>></span>
</li>
</ul>
<h4 class="name" id="emotes"><span class="type-signature"></span>emotes<span class="type-signature"> :<a href="Collection.html">Collection</a>.<string, <a href="Emote.html">Emote</a>></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Cached emotes.<br>
Collectionped by emote code to Emote instance.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line38">line 38</a>
</li></ul></dd>
</dl>
<div class="description usertext">
<p>Cached emotes.<br>
Collectionped by emote code to Emote instance.</p>
</div>
<h5 class="h5-types">Type:</h5>
<ul>
<li>
<span class="param-type"><a href="Collection.html">Collection</a>.<string, <a href="Emote.html">Emote</a>></span>
</li>
</ul>
<h4 class="name" id="ffzModifiersFetched"><span class="type-signature"></span>ffzModifiersFetched<span class="type-signature"> :boolean</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Save if we fetched FFZ's modifier emotes once.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line51">line 51</a>
</li></ul></dd>
</dl>
<div class="description usertext">
<p>Save if we fetched FFZ's modifier emotes once.</p>
</div>
<h5 class="h5-types">Type:</h5>
<ul>
<li>
<span class="param-type">boolean</span>
</li>
</ul>
<h4 class="name" id="globalChannel"><span class="type-signature type-signature-readonly, nullable">(readonly, nullable) </span>globalChannel<span class="type-signature"> :<a href="Channel.html">Channel</a></span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>The global channel for Twitch, BTTV and 7TV.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line59">line 59</a>
</li></ul></dd>
</dl>
<div class="description usertext">
<p>The global channel for Twitch, BTTV and 7TV.</p>
</div>
<h5 class="h5-types">Type:</h5>
<ul>
<li>
<span class="param-type"><a href="Channel.html">Channel</a></span>
</li>
</ul>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id="_cacheBTTVEmote"><span class="type-signature type-signature-private">(private) </span>_cacheBTTVEmote<span class="signature">(channel_id, data, existing_emote<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="BTTVEmote.html">BTTVEmote</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Converts and caches a raw BTTV emote.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line142">line 142</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel_id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Raw data.</p></td>
</tr>
<tr>
<td class="name"><code>existing_emote</code></td>
<td class="type">
<span class="param-type"><a href="BTTVEmote.html">BTTVEmote</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>Existing emote to cache.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="BTTVEmote.html">BTTVEmote</a></span>
</dd>
</dl>
<h4 class="name" id="_cacheFFZEmote"><span class="type-signature type-signature-private">(private) </span>_cacheFFZEmote<span class="signature">(channel_id, data, existing_emote<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="FFZEmote.html">FFZEmote</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Converts and caches a raw FFZ emote.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line192">line 192</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel_id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Raw data.</p></td>
</tr>
<tr>
<td class="name"><code>existing_emote</code></td>
<td class="type">
<span class="param-type"><a href="FFZEmote.html">FFZEmote</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>Existing emote to cache.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="FFZEmote.html">FFZEmote</a></span>
</dd>
</dl>
<h4 class="name" id="_cacheSevenTVEmote"><span class="type-signature type-signature-private">(private) </span>_cacheSevenTVEmote<span class="signature">(channel_id, data, format, existing_emote<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="SevenTVEmote.html">SevenTVEmote</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Converts and caches a raw 7TV emote.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line223">line 223</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel_id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Raw data.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The type file format to use (webp/avif).</p></td>
</tr>
<tr>
<td class="name"><code>existing_emote</code></td>
<td class="type">
<span class="param-type"><a href="SevenTVEmote.html">SevenTVEmote</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>Existing emote to cache.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="SevenTVEmote.html">SevenTVEmote</a></span>
</dd>
</dl>
<h4 class="name" id="_cacheTwitchEmote"><span class="type-signature type-signature-private">(private) </span>_cacheTwitchEmote<span class="signature">(channel_id, data, existing_emote<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="TwitchEmote.html">TwitchEmote</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Converts and caches a raw twitch emote.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line106">line 106</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel_id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>data</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>Raw data.</p></td>
</tr>
<tr>
<td class="name"><code>existing_emote</code></td>
<td class="type">
<span class="param-type"><a href="TwitchEmote.html">TwitchEmote</a></span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>Existing emote to cache.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="TwitchEmote.html">TwitchEmote</a></span>
</dd>
</dl>
<h4 class="name" id="_getRawBTTVEmotes"><span class="type-signature type-signature-private">(private) </span>_getRawBTTVEmotes<span class="signature">(id<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Gets the raw BTTV emotes data for a channel.<br>
Use <code>null</code> for the global emotes channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line121">line 121</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<object>></span>
</dd>
</dl>
<h4 class="name" id="_getRawFFZEmoteSet"><span class="type-signature type-signature-private">(private) </span>_getRawFFZEmoteSet<span class="signature">(id)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Gets the raw FFZ emote data from a set.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line156">line 156</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">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>id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last"><p>ID of the set.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<object>></span>
</dd>
</dl>
<h4 class="name" id="_getRawFFZEmotes"><span class="type-signature type-signature-private">(private) </span>_getRawFFZEmotes<span class="signature">(id)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Gets the raw FFZ emotes data for a channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line170">line 170</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">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>id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<object>></span>
</dd>
</dl>
<h4 class="name" id="_getRawSevenTVEmotes"><span class="type-signature type-signature-private">(private) </span>_getRawSevenTVEmotes<span class="signature">(id<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Gets the raw 7TV emotes data for a channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line206">line 206</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<object>></span>
</dd>
</dl>
<h4 class="name" id="_getRawTwitchEmotes"><span class="type-signature type-signature-private">(private) </span>_getRawTwitchEmotes<span class="signature">(id)</span><span class="type-signature"> → {Promise.<Array.<object>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Gets the raw Twitch emotes data for a channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line86">line 86</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">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>id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<Array.<object>></span>
</dd>
</dl>
<h4 class="name" id="_setupChannel"><span class="type-signature type-signature-private">(private) </span>_setupChannel<span class="signature">(channel_id, format<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {<a href="Channel.html">Channel</a>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Sets up a channel</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line70">line 70</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel_id</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>The type file format to use (webp/avif).</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Channel.html">Channel</a></span>
</dd>
</dl>
<h4 class="name" id="fetchBTTVEmotes"><span class="type-signature"></span>fetchBTTVEmotes<span class="signature">(channel<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<<a href="Collection.html">Collection</a>.<string, <a href="BTTVEmote.html">BTTVEmote</a>>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Fetches the BTTV emotes for a channel.<br>
Use <code>null</code> for the global emotes channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line255">line 255</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="Collection.html">Collection</a>.<string, <a href="BTTVEmote.html">BTTVEmote</a>>></span>
</dd>
</dl>
<h4 class="name" id="fetchFFZEmotes"><span class="type-signature type-signature-async">(async) </span>fetchFFZEmotes<span class="signature">(channel<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<<a href="Collection.html">Collection</a>.<string, <a href="FFZEmote.html">FFZEmote</a>>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Fetches the FFZ emotes for a channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line270">line 270</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="Collection.html">Collection</a>.<string, <a href="FFZEmote.html">FFZEmote</a>>></span>
</dd>
</dl>
<h4 class="name" id="fetchSevenTVEmotes"><span class="type-signature"></span>fetchSevenTVEmotes<span class="signature">(channel<span class="signature-attributes">opt</span>, format<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<<a href="Collection.html">Collection</a>.<string, <a href="SevenTVEmote.html">SevenTVEmote</a>>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Fetches the 7TV emotes for a channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line308">line 308</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
<tr>
<td class="name"><code>format</code></td>
<td class="type">
<span class="param-type">'webp'</span>
|
<span class="param-type">'avif'</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>'webp'</code>
</td>
<td class="description last"><p>The type file format to use (webp/avif).</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="Collection.html">Collection</a>.<string, <a href="SevenTVEmote.html">SevenTVEmote</a>>></span>
</dd>
</dl>
<h4 class="name" id="fetchTwitchEmotes"><span class="type-signature"></span>fetchTwitchEmotes<span class="signature">(channel<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise.<<a href="Collection.html">Collection</a>.<string, <a href="TwitchEmote.html">TwitchEmote</a>>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Fetches the Twitch emotes for a channel.<br>
Use <code>null</code> for the global emotes channel.</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.html">struct/EmoteFetcher.js</a>, <a href="struct_EmoteFetcher.js.html#line237">line 237</a>
</li></ul></dd>
</dl>
<h5 class="h5-parameters">Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Attributes</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>channel</code></td>
<td class="type">
<span class="param-type">int</span>
</td>
<td class="attributes">
<optional><br>
</td>
<td class="default">
<code>null</code>
</td>
<td class="description last"><p>ID of the channel.</p></td>
</tr>
</tbody>
</table>
<h5 class="h5-returns">Returns:</h5>
<dl class="param-type">
<dt>
Type
</dt>
<dd>
<span class="param-type">Promise.<<a href="Collection.html">Collection</a>.<string, <a href="TwitchEmote.html">TwitchEmote</a>>></span>
</dd>
</dl>
<h4 class="name" id="fromObject"><span class="type-signature"></span>fromObject<span class="signature">(emotesArray<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Array.<<a href="Emote.html">Emote</a>>}</span></h4>
<dl class="details">
<dt class="tag-description">Description:</dt>
<dd class="tag-description"><ul class="dummy"><li><p>Converts emote Objects to emotes</p></li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="struct_EmoteFetcher.js.htm