EmoteFetcher

EmoteFetcher

new EmoteFetcher(clientId, clientSecret)

Description:
  • Fetches and caches emotes.

Source:
Parameters:
Name Type Description
clientId string

The client id for the twitch api.

clientSecret string

The client secret for the twitch api.

Members

apiClient

Description:
  • Twitch api client.

Source:

Twitch api client.

channels :Collection.<string, Channel>

Description:
  • Cached channels.
    Collectionped by name to Channel instance.

Source:

Cached channels.
Collectionped by name to Channel instance.

Type:

emotes :Collection.<string, Emote>

Description:
  • Cached emotes.
    Collectionped by emote code to Emote instance.

Source:

Cached emotes.
Collectionped by emote code to Emote instance.

Type:

ffzModifiersFetched :boolean

Description:
  • Save if we fetched FFZ's modifier emotes once.

Source:

Save if we fetched FFZ's modifier emotes once.

Type:
  • boolean

(readonly, nullable) globalChannel :Channel

Description:
  • The global channel for Twitch, BTTV and 7TV.

Source:

The global channel for Twitch, BTTV and 7TV.

Type:

Methods

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

Description:
  • Converts and caches a raw BTTV emote.

Source:
Parameters:
Name Type Description
channel_id int

ID of the channel.

data Object

Raw data.

Returns:
Type
BTTVEmote

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

Description:
  • Converts and caches a raw FFZ emote.

Source:
Parameters:
Name Type Description
channel_id int

ID of the channel.

data Object

Raw data.

Returns:
Type
FFZEmote

(private) _cacheSevenTVEmote(channel_id, data, format) → {SevenTVEmote}

Description:
  • Converts and caches a raw 7TV emote.

Source:
Parameters:
Name Type Description
channel_id int

ID of the channel.

data Object

Raw data.

format string

The type file format to use (webp/avif).

Returns:
Type
SevenTVEmote

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

Description:
  • Converts and caches a raw twitch emote.

Source:
Parameters:
Name Type Description
channel_id int

ID of the channel.

data Object

Raw data.

Returns:
Type
TwitchEmote

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

Description:
  • Gets the raw BTTV emotes data for a channel.
    Use null for the global emotes channel.

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

ID of the channel.

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

(private) _getRawFFZEmoteSet(id) → {Promise.<Array.<Object>>}

Description:
  • Gets the raw FFZ emote data from a set.

Source:
Parameters:
Name Type Description
id int

ID of the set.

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

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

Description:
  • Gets the raw FFZ emotes data for a channel.

Source:
Parameters:
Name Type Description
id int

ID of the channel.

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

(private) _getRawSevenTVEmotes(idopt) → {Promise.<Array.<Object>>}

Description:
  • Gets the raw 7TV emotes data for a channel.

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

ID of the channel.

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

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

Description:
  • Gets the raw Twitch emotes data for a channel.

Source:
Parameters:
Name Type Description
id int

ID of the channel.

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

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

Description:
  • Fetches the BTTV emotes for a channel.
    Use null for the global emotes channel.

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

ID of the channel.

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

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

Description:
  • Fetches the FFZ emotes for a channel.

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

ID of the channel.

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

fetchSevenTVEmotes(channelopt, formatopt) → {Promise.<Collection.<string, SevenTVEmote>>}

Description:
  • Fetches the 7TV emotes for a channel.

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

ID of the channel.

format 'webp' | 'avif' <optional>
'webp'

The type file format to use (webp/avif).

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

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

Description:
  • Fetches the Twitch emotes for a channel.
    Use null for the global emotes channel.

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

ID of the channel.

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