Skip to content

t2linux/matrix-bot

Repository files navigation

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

  1. Copy docker-compose.example.yml to docker-compose.yml and links.json to a local file.

  2. Update the environment variables in docker-compose.yml.

  3. Populate links.json with your key-value pairs.

  4. Run the bot:

    docker-compose up -d

Local Development

  1. Copy .env.example to .env.

  2. Update .env with your credentials.

  3. Run the bot:

    cargo run

Commands

  • .wiki list: Lists all available wiki keys.
  • .wiki <term>: Fetches the link associated with <term> from the links.json file.

About

t2linux.org's Matrix bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages