Lexicon is a bot based on NLP.js that currently hangs in ESOUI room on Gitter.
Here's a brief summary of the most important locations in the repository.
src/index.jsis the NLP.js bot entrypoint.src/connectoris where we put different connectors, e.g. Matrix, Discord, etc.src/featuresis where we put what the bot can do.storageis used to store runtime data generated by the bot.supportis used during development to launch Matrix and Element instances.
You'll need Node.js v20+.
You can just run the bot, providing a connector and its configuration. It'll automatically install dependencies if needed.
npm start -- --connector console💡 The
consoleconnector is the easiest one to use if you're just working on bot features.
We provide support files to launch local Matrix and Element instances so you can test drive your bot. You'll need Docker v20+ and Docker Compose plugin installed. Also, make sure ports 8000 and 8008 are available.
docker compose -f support/compose.yml up
⚠️ If it fails with a "Permission denied" error, stop the containers and rundocker compose -f support/compose.yml run --rm synapse generate. It'll fix up the/datadirectory ownership, then you can start the containers again.
Head over to http://localhost:8000, sign-up and use the credentials with the bot:
npm start -- -c matrix -h http://matrix.local.crz.li -u bot -p thisisnotsecure -xℹ️ We use the hostname
matrix.local.crz.libecause it resolves to127.0.0.1, and it's also the hostname of the container.
You'll need Docker v20+ and Docker Compose plugin installed. Clone the repository, then copy example.env to .env and edit it appropriately. Finally, launch the bot service in background.
docker compose up -dThe MIT License © 2016 Arthur Corenzan and collaborators.