Yet another Matrix bot library.
Project description
mxbt v0.2.8
Yet another Matrix bot library.
Installation
$ pip install mxbt
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"
}
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.
Contacts
Contact | Description |
---|---|
Matrix |
Matrix server |
Donates
Monero/XMR: 47KkgEb3agJJjSpeW1LpVi1M8fsCfREhnBCb1yib5KQgCxwb6j47XBQAamueByrLUceRinJqveZ82UCbrGqrsY9oNuZ97xN
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.2.8.tar.gz
(27.0 kB
view details)
Built Distribution
mxbt-0.2.8-py3-none-any.whl
(29.6 kB
view details)
File details
Details for the file mxbt-0.2.8.tar.gz
.
File metadata
- Download URL: mxbt-0.2.8.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 653d2c1211056c29705931c7fe6ef4ff342c4b1d7e5acee2b26291a56e1f8142 |
|
MD5 | 63873509a8bdbf464826960073c46600 |
|
BLAKE2b-256 | 91e32affe8db66f0f7040bb70615052333a5259cdc1f036cc663f239780070a1 |
File details
Details for the file mxbt-0.2.8-py3-none-any.whl
.
File metadata
- Download URL: mxbt-0.2.8-py3-none-any.whl
- Upload date:
- Size: 29.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | caec0308909e7ca4b816742b2196af92cd74ada44ebd444188fc7bfc6eeccdf7 |
|
MD5 | 0660b598633053119c5d682c2b982d96 |
|
BLAKE2b-256 | d6a83850509fd711635677cfc754eb51004083f152efb1e60283e46b7a767022 |