Little README update

This commit is contained in:
2026-09-09 19:46:05 +03:00
parent f58c8601d1
commit b8e598715c

View File

@@ -22,7 +22,7 @@ python -m pip install git+https://git.tyukalov.su/nikita/mab@v0.4.0
```
You should specify package version you want to use, because `main` without tags
contain unstable code.
contains unstable code.
## Basic usage
@@ -38,7 +38,7 @@ from mab.types import RoomEventData
async def on_message(data: RoomEventData) -> None:
text = f"Your message contains {len(data.event.body)} symbols"
await data.bot.send_text_to_room(data.room, text)
await data.bot.send_text(data.room, text)
async def main() -> None:
# create and start the bot
@@ -49,7 +49,7 @@ async def main() -> None:
)
bot = MatrixBot(matrix_bot_config)
bot.add_callback(
~SenderIsBotFilter() & TextContainsFilter(["test", "hello", "hi"]),
~SenderIsBotFilter() & TextContainsFilter(["hello", "hi"]),
on_message
)
await bot.start()