Matrix Admin bot uses matrix-bot-sdk
This bot helps to keep the matrix channels maintainable and implements functionality
which runs bulk invite to the channels new users
Initial tool request
Eng requirements doc
- Update your project's details in
package.json
. - Run
yarn install
to get the dependencies.
To build it: yarn build
.
To run it: yarn dev
To check the lint: yarn lint
To build the Docker image: docker build -t your-bot:latest .
To run the Docker image (after building): docker run --rm -it your-bot:latest
$ cp .env.example .env
This is where the bot's entry point is. Here you can see it reading the config, preparing the storage, and setting up other stuff that it'll use throughout its lifetime. Nothing in here should really require modification - most of the bot is elsewhere.
When the bot receives a command (see bot.ts
for handoff) it gets processed here. The command structure
is fairly manual, but a basic help menu and processing for a single command is there.
This is the bot's !adminbot hello
command. It doesn't do much, but it is an example.
This is where the project's build files go. Not really much to see here.
This is the default storage location. Also not much to see here.
Once you followed all steps above, and server is up and running
- Create a private room for testing your bot from localhost (make sure to have Encryption DISABLED, otherwise bot won't be able to recognize commands)
- Invite your bot to this room (invitations are auto-accepted)
- Write command in channel with your bot, and have fun :)