Crates.io | waasabi-matrix |
lib.rs | waasabi-matrix |
version | 0.2.0 |
source | src |
created_at | 2021-04-23 14:06:24.322878 |
updated_at | 2021-04-23 14:06:24.322878 |
description | Your friendly Ferris in a Matrix server near you |
homepage | https://github.com/baytechc/waasabi-matrix |
repository | https://github.com/baytechc/waasabi-matrix |
max_upload_size | |
id | 388625 |
size | 131,969 |
waasabi-matrix
is a Matrix chat bot that can handle logging, moderation and some admin operations.
The bot needs to be configured before use. The configuration file is in the TOML format. The path to the bot configuration should be specified as a commandline parameter when starting the bot.
An example configuration is provided in bot-config.example.toml
The configuration consists of the following fields:
The bot will connect to the Matrix server specified in the configuration and will use it to access the Matrix network.
Currently the bot does not handle well being rate limited by the Matrix server so it is recommended to disable rate limiting for the bot user (and thus, we recommend using a Matrix server that allows for this). At the moment this can only be done manually.
[matrix] |
|
---|---|
homeserver |
The URL of the Matrix server to connect to |
user |
Full matrix username of the bot user |
password |
Password of the bot user |
admins |
A list (array) of matrix usernames who can control the bot using bot commands |
The bot collects all room information and incoming messages and forwards them to the backend integration. Currently the only supported integration is Waasabi's chat integration via Strapi.
[backend] |
|
---|---|
host |
URL of the exposed API root (for Waasabi servers this is by default under <origin>/waasabi ) |
user |
Username with API access privileges (Event Manager Integrations role) |
password |
Password of the authenticated user |
integrations_endpoint |
Optional The endpoint to use for posting Matrix information. Default: event-manager/integrations |
This bot exposes a http API that can be used to send commands to the bot through API requests.
[api] |
|
---|---|
listen |
The address or ip/port combination to listen (expose the API) on |
secret |
The secret that is required to be present in all API requests |
POST /invite
{
api_key: <secret string>,
user_id: <@user:homeserver>,
room_id: <#channel:homeserver>,
}
POST /room
{
api_key: <secret string>,
alias: <room name>,
name: <room display name>,
topic: <optional topic for the room>,
}
These are commands that the bot understands.
Command | Description |
---|---|
!ping |
Admin-only. Ping-pong with the bot. |
!invite <user id> |
Admin-only. Invite a user to the current room. |
!create <room alias> <room name> |
Admin-only. Create a new room. |
!op |
Admin-only. Give room admin access to all admin users. |
!op <user id> |
Admin-only. Add a new user to the list of admins. |
?ops |
Admin-only. List all current admin users. |
Build the code, then use the binary in target/release/waasabi-matrix
:
cargo build --release
Or build install it right away:
cargo install --path .
Building this app requires libopenssl
. On Ubuntu, use:
apt-get install libssl-dev
Otherwise you might be receiving an error message during build:
Package openssl was not found in the pkg-config search path.
Want to join us? Check out our The "Contributing" section of the guide.
The waasabi-matrix project adheres to the Contributor Covenant Code of Conduct. This describes the minimum behavior expected from all contributors.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.