EmoteFetcher

EmoteFetcher

new EmoteFetcher()

Source:

Fetches and caches emotes.

Members

channels :Collection.<string, Channel>

Source:

Cached channels.
Collectionped by name to Channel instance.

Type:

emotes :Collection.<string, Emote>

Source:

Cached emotes.
Collectionped by emote code to Emote instance.

Type:

(readonly, nullable) globalChannel :Channel

Source:

The global channel for both Twitch and BTTV.

Type:

Methods

(private) _cacheBTTVEmote(name, data) → {BTTVEmote}

Source:

Converts and caches a raw BTTV emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
BTTVEmote

(private) _cacheFFZEmote(name, data) → {FFZEmote}

Source:

Converts and caches a raw FFZ emote.

Parameters:
Name Type Description
name string

Name of the channel.

data Object

Raw data.

Returns:
Type
FFZEmote

(private) _cacheTwitchEmote(id, data) → {TwitchEmote}

Source:

Converts and caches a raw twitch emote.

Parameters:
Name Type Description
id string

ID of the emote.

data Object

Raw data.

Returns:
Type
TwitchEmote

(private) _getRawBTTVEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw BTTV emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawFFZEmotes(name) → {Promise.<Array.<Object>>}

Source:

Gets the raw FFZ emotes data for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Array.<Object>>

(private) _getRawTwitchEmotes() → {Promise.<Object>}

Source:

Gets the raw twitch emotes data.

Returns:
Type
Promise.<Object>

fetchBTTVEmotes(nameopt) → {Promise.<Collection.<string, BTTVEmote>>}

Source:

Fetches the BTTV emotes for a channel.
Use null for the global emotes channel.

Parameters:
Name Type Attributes Default Description
name string <optional>
null

Name of the channel.

Returns:
Type
Promise.<Collection.<string, BTTVEmote>>

fetchFFZEmotes(name) → {Promise.<Collection.<string, FFZEmote>>}

Source:

Fetches the FFZ emotes for a channel.

Parameters:
Name Type Description
name string

Name of the channel.

Returns:
Type
Promise.<Collection.<string, FFZEmote>>

fetchTwitchEmotes(namesopt) → {Promise.<Collection.<string, TwitchEmote>>}

Source:

Fetches and caches all twitch emotes.
If channel names are specified, will only cache those channels.
Use null for the global emotes channel.

Parameters:
Name Type Attributes Description
names string | Array.<string> <optional>

Names of channels to cache.

Returns:
Type
Promise.<Collection.<string, TwitchEmote>>