sumon
Sumon module. Summons the bot.
- sumon
- .description
- .configuration :
Object
- .enabled :
Boolean
- .autoTimeout :
Number
- .userTimeout :
Number
- .probability :
Number
- .messages :
Array
- .enabled :
- .name
- .priority
- .version
- .onNotify(type, notification, topic, post, callback)
- .begin(browser, config)
sumon.description
Brief description of this module for Help Docs
Kind: static property of sumon
sumon.configuration : Object
Default Configuration settings for this sock_module
Kind: static property of sumon
- .configuration :
Object
- .enabled :
Boolean
- .autoTimeout :
Number
- .userTimeout :
Number
- .probability :
Number
- .messages :
Array
configuration.enabled : Boolean
Is the module enabled?
Kind: static property of configuration
configuration.autoTimeout : Number
What's the timeout for backfilling old summons
Kind: static property of configuration
configuration.userTimeout : Number
Unused
Kind: static property of configuration
configuration.probability : Number
How likely it is that the bot will respond to summons. Probability is between 0 and 1
Kind: static property of configuration
configuration.messages : Array
Messages to use when being summoned.
Kind: static property of configuration
sumon.name
The name of this sock_module
Kind: static property of sumon
sumon.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 sumon
sumon.version
The version of this sock_module
Kind: static property of sumon
sumon.onNotify(type, notification, topic, post, callback)
Runs on notification. Uses a random chance of appearing to determine if it should appear or not, controlled by the module configuration.
Kind: static method of sumon
Param | Type | Description |
---|---|---|
type | string |
The type of event. Only responds if this is 'mentioned' |
notification | string |
The notification to respond to |
topic | string |
Unused. |
post | string |
The post the notification was for |
callback | function |
The callback to notify when processing is complete. |
sumon.begin(browser, config)
Bootstrap the module
Kind: static method of sumon
Param | Type | Description |
---|---|---|
browser | string |
discourse. |
config | object |
The configuration to use |