Added branches system, updated database, v0.8.0

- Updated to v0.8.0
- Added note about rate limitting to README
- Updated examples to work with new callback system
- Updated README to describe new callback system correctly
- Added branch_bot.py example
- Updated database so internal functions are prefixed with underscore now
- Replaced MatrixBot.add_room_event_callback with MatrixBot.add_callback
- Database schema version is 4 now
- Added room state to database to simplify user code
- Added RoomStateFilter
This commit is contained in:
2026-12-06 21:24:05 +03:00
parent b99b2fa9bf
commit 4dae739cfe
18 changed files with 660 additions and 232 deletions

View File

@@ -29,9 +29,7 @@ async def main() -> None:
storage_directory="session_storage"
)
bot = MatrixBot(config)
bot.add_callback(
~SenderIsBotFilter() & BodyExistsFilter() & MessageTypeFilter(MessageType.TEXT),
on_text_message)
bot.callbacks.add_callback(MessageTypeFilter(MessageType.TEXT), on_text_message)
# run until Ctrl+C
try: