Skip to main content

Setup

To install a module you have to extract to folder into the "modules" folder next to the EvntBoard executable.

In the case of module development, it is possible to use symbolic link in modules to an external folder!

Configuration#

To activate the module you have to add an entry on property "modules" in the config file evntboard.json

{
...
"modules": [
...,
{
"name": "string",
"customName": "string",
"entrypoint": "string",
"config": {}
},
"string",
...
]
}

You can add a simple folder name, if you dont have to pass a config or other properties.

name#

This is the name of the folder that contains the plugin

customName#

In the case of multi instance modules, this parameter is used to differentiate the instances in the triggers!

entrypoint#

By default, it load index.js.

If a package.json file exist in the module folder, it use property bin then main otherwise index.js

Usage#

To call a module from a trigger you have to use the module name in camelCase !

Example

Config

{
"modules": [
{
"name": "module-obs",
"config": {
"host": "0.0.0.0",
"port": 4444,
"password": null
}
},
{
"name": "module-twitch",
"customName": "twitch-main",
"config": {
"token": "my twitch auth token"
}
},
{
"name": "module-twitch",
"customName": "twitch-bot",
"config": {
"token": "my twitch second auth token"
}
}
]
}

In trigger reaction

const reaction = async ({ payload }) => {
twitchBot.say('Hello from bot account')
twitchMain.say('Hi from my main account')
const version = await moduleObs.getVersion()
console.log('obs version', version)
}