sockmafia

Mafiabot plugin

Helps run mafia games, providing features such as vote tracking and listing.

Author: Accalia, Dreikin, Yamikuronue
License: MIT

sockmafia.defaultConfig

Default plugin configuration

Kind: static property of sockmafia

defaultConfig.db : string

File location for database.

Kind: static property of defaultConfig
Default: "./mafiadb"

sockmafia.activate() ⇒ Promise

Sockbot 3.0 Activation function

Kind: static method of sockmafia
Returns: Promise - A promise that will resolve when the activation is complete

sockmafia.plugin(forum, config) ⇒ Object

Sockbot 3.0 Plugin function

Kind: static method of sockmafia
Returns: Object - A temporary object representing this instance of the forum

Param Type Description
forum Forum The forum provider's Forum class
config Object The plugin-specific configuration

sockmafia.createFromFile(plugConfig) ⇒ Promise

Create the game from the configuration file

Kind: static method of sockmafia
Returns: Promise - A promise that resolves when the creation is complete

Param Type Description
plugConfig Object The configuration file

sockmafia~registerMods(game, mods)

Register the mods listed in the configuration.

Kind: inner method of sockmafia

Param Type Description
game Number Thread number for the game.
mods Array.<string> Array of mod names to add to the game.

sockmafia~registerPlayers(game, players)

Register the players listed in the configuration.

Kind: inner method of sockmafia

Param Type Description
game Number Thread number for the game.
players Array.<string> Array of player names to add to the game.