Markov

Markov

Author: RaceProUK
License: MIT

Markov.defaultConfig

Default plugin configuration

Kind: static property of Markov

defaultConfig.corpus : string

Corpus location

Kind: static property of defaultConfig
Default: ""

Markov.prepare(plugConfig, config, events, browser)

Prepare Plugin prior to login

Kind: static method of Markov

Param Type Description
plugConfig * Plugin specific configuration
config Config Overall bot configuration
events externals.events.SockEvents EventEmitter used for the bot
browser Browser Web browser for communicating with discourse

Markov.start()

Start the plugin after login

Kind: static method of Markov

Markov.stop()

Stop the plugin prior to exit or reload

Kind: static method of Markov

Markov~loadCorpus()

Load the corpus and build the in-memory corpus array and state machine dictionary

Kind: inner method of Markov

Markov~reply(notification, topic, post)

Reply to summons

Kind: inner method of Markov

Param Type Description
notification external.notifications.Notification Notification recieved
topic external.topics.Topic Topic trigger post belongs to
post external.posts.CleanedPost Post that triggered notification

Markov~random(min, max) ⇒ number

Generate a random number in the specified range.

Kind: inner method of Markov
Returns: number - The generated number

Param Type Description
min number The lower bound of the range
max number The upper bound of the range