likes

Likes module. The autoliker

likes.description

Brief description of this module for Help Docs

Kind: static property of likes

likes.configuration : Object

Default Configuration settings for this sock_module

Kind: static property of likes

configuration.enabled : Boolean

Whether this module should be enabled

Kind: static property of configuration

configuration.follow : Boolean

Whether this should... something involving following. Imprint on mother ducks?

Kind: static property of configuration

configuration.binge : Boolean

Whether this module should binge-like to catch up on things you didn't like while it was down

Kind: static property of configuration

configuration.bingeHour : Number

The hour at which to binge-like

Kind: static property of configuration

configuration.bingeMinute : Number

The minute at which to binge-like

Kind: static property of configuration

configuration.bingeCap : Number

Maximum amout of posts to like while binging

Kind: static property of configuration

configuration.topic : Number

The topic to auto-like. Defaults to /t/1000

Kind: static property of configuration

configuration.cyborgDelay : Number

How long to delay before liking in cyborg mode.

Kind: static property of configuration

likes.name

The name of this sock_module

Kind: static property of likes

likes.priority

If defined by a sock_module it is the priority of the module with respect to other modules.

sock_modules should not define modules with negative permissions. Default value is 50 with lower numbers being higher priority.

Kind: static property of likes

likes.version

The version of this sock_module

Kind: static property of likes

likes.onMessage(message, post, callback)

Handler for when a message is received. If it is a new post creation message in the correct thread, the module will like it.

Kind: static method of likes

Param Type Description
message Object The message that was received
post Object The post information for that message
callback function The callback to call when done

likes.registerListeners(callback)

Register listeners that do the following if we are in follow mode

Kind: static method of likes

Param Type Description
callback function the callback to call when complete

likes.begin(browser, config)

Bootstrap the module

Kind: static method of likes

Param Type Description
browser string discourse.
config object The configuration to use

likes~format(str, dict) ⇒ String

Replaces variables in formatting strings, kind of like printf

Kind: inner method of likes
Returns: String - the message after replacement

Param Type Description
str String The string to format
dict Array The variables to format into the string

likes~binge(callback)

Wrapper that standardizes parameters for innerBinge. Will binge on either one topic or many.

Kind: inner method of likes

Param Type Description
callback function The callback to call when done binging

likes~innerBinge(topic, callback)

Perform a binge-liking.

Kind: inner method of likes

Param Type Description
topic Number The topic number to binge-like on
callback function the callback to call when done binging

likes~scheduleBinges()

Schedule new binges according to configuration

Kind: inner method of likes