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(name, data) → {TwitchEmote}

Source:

Converts and caches a raw twitch emote.

Parameters:
Name Type Description
name string

Name of the channel.

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(id) → {Promise.<Array.<Object>>}

Source:

Gets the raw Twitch emotes data for a channel.

Parameters:
Name Type Description
id int

Name of the channel.

Returns:
Type
Promise.<Array.<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(idopt) → {Promise.<Collection.<string, TwitchEmote>>}

Source:

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

Parameters:
Name Type Attributes Default Description
id int <optional>
null

ID of the channel.

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