Class

Addons

Addons(tool)

Constructor

new Addons(tool)

This module finds addons, loads and initialze them
Parameters:
Name Type Description
tool TTVTool

View Source mod/addons.js, line 14

Methods

addonInstalled(name) → {Boolean}

Checks if an addon is installed
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 171

Boolean

findAndReplaceInMessage(message) → {Array}

Takes a message and searches for addons which have a findAndReplaceInMessage function. Those addons are then able to parse the message and replace some parts (e.g. emotes)
Parameters:
Name Type Description
message string

View Source mod/addons.js, line 495

Array

getAddon(name) → {null|Object}

Gets the addon by name
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 210

Either the addon module or null when not found
null | Object

getInstalledAddonDescription(name) → {String}

Returns the description of the installed addon
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 197

Description of the addon or 'No description' if not installed or not defined
String

getInstalledAddonVersion(name) → {String}

Returns the version of the installed addon
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 184

Version of the addon or 'Unkown' if not installed or not defined
String

Addons(tool)

Constructor

new Addons(tool)

Parameters:
Name Type Description
tool TTVTool

View Source mod/addons.js, line 25

Methods

addonInstalled(name) → {Boolean}

Checks if an addon is installed
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 171

Boolean

findAndReplaceInMessage(message) → {Array}

Takes a message and searches for addons which have a findAndReplaceInMessage function. Those addons are then able to parse the message and replace some parts (e.g. emotes)
Parameters:
Name Type Description
message string

View Source mod/addons.js, line 495

Array

getAddon(name) → {null|Object}

Gets the addon by name
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 210

Either the addon module or null when not found
null | Object

getInstalledAddonDescription(name) → {String}

Returns the description of the installed addon
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 197

Description of the addon or 'No description' if not installed or not defined
String

getInstalledAddonVersion(name) → {String}

Returns the version of the installed addon
Parameters:
Name Type Description
name String Name of the addon

View Source mod/addons.js, line 184

Version of the addon or 'Unkown' if not installed or not defined
String