Yet another Matrix bot library.
Project description
mxbt
Yet another Matrix bot library, built on matrix-nio.
Feauters
- Simple and powerfull bots creating
- Custom emojis support
- Getting
- Sending
- Creating
- Files sending
- External files
- Internal files
- Native mentions
- Access to
matrix-nio
features - Event filters
- Bot modules support
- Wait for event system
- Full e2ee support
Installation
With pip:
$ pip install mxbt
With git and python:
$ git clone https://codeberg.org/librehub/mxbt
$ cd mxbt
$ python -m pip install .
Getting started
More examples here or in docs.
from mxbt import Bot, Context, Creds, Filter
bot = Bot(
prefix="!", # Standart command prefix, commands can setup it own prefix
creds=Creds.from_json_file("credits.json")
)
@bot.on_command(prefix="?", aliases=["test", "t"])
@Filter.from_users(['@username:homeserver']) # Event works only with this senders
async def ctx_echo(ctx: Context) -> None: # Context object contains main info about event
await ctx.reply(ctx.body) # Reply message to event room
bot.run()
credits.json structure
{
"homeserver" : "https://matrix.org",
"user_id" : "user",
"password" : "password"
}
Built with mxbt
Project | Description |
---|---|
sofie | A simple selfbot |
cryptomx | A crytpocurrency notification bot |
Special thanks
- simplematrixbotlib for base parts of API, Listener and Callbacks code ideas. Code from simplematrixbotlib is included under the terms of the MIT license - Copyright (c) 2021-2023 Isaac Beverly
- matrix-nio for cool client library.
Support
Any contacts and crytpocurrency wallets you can find on my profile page.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mxbt-0.3.4.tar.gz
(30.3 kB
view hashes)
Built Distribution
mxbt-0.3.4-py3-none-any.whl
(33.4 kB
view hashes)