mirror of
https://github.com/t2linux/matrix-bot.git
synced 2026-04-30 13:54:23 -07:00
aa38a8ef1f6be3dd8a2242a130bc8347768abbb2
Matrix Wiki Link Bot
A simple Matrix bot that listens for commands starting with .wiki and responds with links from a configured JSON store.
Configuration
The bot is configured via environment variables.
| Variable | Description | Default |
|---|---|---|
MATRIX_HOMESERVER |
The URL of your Matrix homeserver (e.g., https://matrix.org). |
|
MATRIX_USERNAME |
The bot's Matrix username. | |
MATRIX_PASSWORD |
The bot's Matrix password. | |
IGNORE_BRIDGE_USERS |
If set to true, the bot will ignore messages from senders whose MXID starts with @discord_. |
false |
Usage
Docker
-
Copy
docker-compose.example.ymltodocker-compose.ymlandlinks.jsonto a local file. -
Update the environment variables in
docker-compose.yml. -
Populate
links.jsonwith your key-value pairs. -
Run the bot:
docker-compose up -d
Local Development
-
Copy
.env.exampleto.env. -
Update
.envwith your credentials. -
Run the bot:
cargo run
Commands
.wiki list: Lists all available wiki keys..wiki <term>: Fetches the link associated with<term>from thelinks.jsonfile.
Languages
Rust
91.5%
Dockerfile
8.5%