This repository contains a simple Matrix client written in JavaScript to run in the current Node.js LTS version. It uses the Matrix JS SDK to:
- login to Matrix as an existing user using
m.login.password - skeleton for adding the remaining code to join a room and send a message to that room
The develop branch contains a full example, where the bot waits till someone replies back "hello".
- Install Node: Use the latest Node.js LTS (v14.15.0 as of this writing).
- Make sure you have
npmoryarnon the PATH.
- Make sure you have
- Install depencendies: In the root directory, run
$ npm install - Add credentials: Copy
credentials.shtolocal.credentials.sh, and add Matrix credentials in the new filelocal.credentials.shis added to.gitignore, so you don't have to worry about leaking your secrets- Source the file:
source local.credentials.sh
- Run: From the same directory, run
$ node index.js
License: Unlicense/Public domain