Functions

getVersion()string

Get current version information, using latest commit sha1 as a fallback if detected version is semantic release placeholder.

getUserAgent(cfg, provider)string

Construct a useragent for sockbot to use

_buildMessage(args)string

Construct a stringified message to log

log(...message)

Log a message to stdout

error(...message)

Log a message to stderr

relativeRequire(relativePath, module, requireIt)object | function

Load a module relative to a local path, or relative to loaded config file

loadPlugins(forumInstance, botConfig)Promise

Load plugins for forum instance

activateConfig(botConfig)Promise

Activate a loaded configuration.

getVersion() ⇒ string

Get current version information, using latest commit sha1 as a fallback if detected version is semantic release placeholder.

Kind: global function
Returns: string - Version information

getUserAgent(cfg, provider) ⇒ string

Construct a useragent for sockbot to use

Kind: global function
Returns: string - User-Agent to use for a forum instance

Param Type Description
cfg object Instance Configuration to construct User Agent for
provider Forum Forum Provider class to construct User Agent for

_buildMessage(args) ⇒ string

Construct a stringified message to log

Kind: global function
Returns: string - stringified message

Param Type Description
args Array.<*> Item to stringify and log

log(...message)

Log a message to stdout

Kind: global function

Param Type Description
...message * Message to log to stdout

error(...message)

Log a message to stderr

Kind: global function

Param Type Description
...message * Message to log to stderr

relativeRequire(relativePath, module, requireIt) ⇒ object | function

Load a module relative to a local path, or relative to loaded config file

Kind: global function
Returns: object | function - Loaded module

Param Type Description
relativePath string Local path to use
module string Module to load
requireIt function Function to use to load module

loadPlugins(forumInstance, botConfig) ⇒ Promise

Load plugins for forum instance

Kind: global function
Returns: Promise - Resolves when plugins have been loaded

Param Type Description
forumInstance Provider Provider instance to load plugins into
botConfig object Bot configuration to load plugins with

activateConfig(botConfig) ⇒ Promise

Activate a loaded configuration.

Kind: global function
Returns: Promise - Resolves when configuration is fully activated

Param Type Description
botConfig object Configuration to activate