Yet another Matrix bot library.
Project description
mxbt
Yet another Matrix bot library.
Installation
$ pip install mxbt
Usage
credits.json:
{
"homeserver" : "https://matrix.org",
"user_id" : "user",
"password" : "password"
}
from mxbt import Bot
bot = Bot(
prefix="!", # Standart command prefix, commands can setup it own prefix
creds="credits.json" # Creds may be filename or dict with credits data
)
@bot.listener.on_command(prefix="?", alliases=["e", "echo"])
async def echo(room, message) -> None:
await bot.api.send_text(
room.room_id, message.body,
reply_to=message.event_id
)
bot.run()
Special thanks
- simplematrixbotlib for base parts of API, Listener and Callbacks code ideas.
- 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.0.4.tar.gz
(19.7 kB
view hashes)
Built Distribution
mxbt-0.0.4-py3-none-any.whl
(20.4 kB
view hashes)