This is a very work-in-progress bot for Matrix, to use on the Mozilla Matrix server.
Make sure that nodejs 10 or more is installed on your machine.
- Run
npm install
to make sure all your dependencies are up to date. - Copy
config.json.example
toconfig.json
and fill the access token for your bot as documented there. - (Optional) Make your code beautiful with
npm run pretty
. - Start the script with
npm start
.
See the list. You can refer to a module by its filename in the modules directory.
- Create a new JS file in
./src/modules
. - It must export an object of the form:
{
handler: async function(client, roomId, msg) {
client.sendText(roomId, "hello world!");
},
help: "An help message for this module."
}
- The module's name is the file name, add it to your configuration.
- Fun and profit.
A Dockerfile has been set up to ease local and production deployment of this bot. You can spawn an instance with the following:
docker run -ti \
-v /path/to/local/config.json:/config.json \
-v /path/to/local/data-dir:/app/data \
bnjbvr/botzilla
If you want to hang out and talk about botzilla, please join our Matrix room.
There's also a Matrix room to try the bot features live.