Commit Graph

5 Commits

Author SHA1 Message Date
d5367ebc6b Big refactoring
- Changed event callback signature to `(ctx: EventContext, vars: ContextVars)`
- Changed event filter signature to `(ctx: EventContext, vars: ContextVars)`
- Partially fixed examples
- Refactored `src/mab/__init__.py` to be more structured
- Added support for local event context variables so that different filters don't mess with each other
- Refactored file structure for context variables
- Added support for combination of ContextVars
- `ContextVarsPopulator` does not look builders dynamically anymore; `ContextVarsPopulator.autobuilder` is used to mark function as a builder that must be automatically called
- `ContextVarsPopulator` does not required to be created anymore
- Added context variable `CTX_COMMAND`
- `MessageTypeFilter` supports message types passed as strings from now on
- `MessageHasFile` renamed to `MessageHasFileFilter`
- Added docs for context variables
2026-10-31 20:37:57 +03:00
eacb0c0d25 Refactoring in progress
- Context variables are no longer stored in `EventContext`, they are stored in `ContextVars` from now on
- Context variables related stuff has been moved to `mab.context.vars`
- Removed `CTX_FILE`
- Changed variable builder name prefix to `autobuild_`
- Changed variable builder signature to (EventContext, ContextVars)
- Most examples are broken
2026-10-31 16:30:24 +03:00
2867582c01 Got rid of proxy methods in MatrixBot, v0.6.0
- Updated README.md
- Updated examples
- `MatrixBot` does not redefine methods from classes it is composed of anymore
2026-09-27 16:17:40 +03:00
86257a70e3 Added overloads for MatrixBot.download_file 2026-09-13 03:39:23 +03:00
0e9b621895 Added file downloading, updated to v0.5.1 2026-09-13 03:17:12 +03:00