Addons(tool)

new Addons(tool)

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

Members

Gives you a new instance of the addons menu

Methods

addonInstalled(name) → {Boolean}

Checks if an addon is installed
Parameters:
Name Type Description
name String Name of the addon
Returns:
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
Returns:
Array

getAddon(name) → {null|Object}

Gets the addon by name
Parameters:
Name Type Description
name String Name of the addon
Returns:
null | Object - Either the addon module or null when not found

getInstalledAddonDescription(name) → {String}

Returns the description of the installed addon
Parameters:
Name Type Description
name String Name of the addon
Returns:
String - Description of the addon or 'No description' if not installed or not defined

getInstalledAddonVersion(name) → {String}

Returns the version of the installed addon
Parameters:
Name Type Description
name String Name of the addon
Returns:
String - Version of the addon or 'Unkown' if not installed or not defined