- Updated dependencies:
- tgbot 0.32
- Updated dependencies:
- governor 0.7
- seance 0.15
- tgbot 0.31
- tokio 1.41
- Updated dependencies:
- seance 0.14
- tgbot 0.30
- tokio 1.40
- Updated dependencies:
- tgbot 0.29
- Updated dependencies:
- seance 0.13
- tgbot 0.28
- tokio 1.39
- Updated dependencies:
- tgbot 0.27
- Updated dependencies:
- tgbot 0.26
- Updated dependencies:
- seance 0.12
- tgbot 0.25
- tokio 1.38
- Inner value of
Ref
is public now. This allows to use pattern matching syntax in handler arguments when you need direct access to the underlying data.
- Updated dependencies:
- tgbot 0.24
- Updated dependencies:
- tgbot 0.23
- Updated dependencies:
- seance 0.11
- tgbot 0.22
- tokio 1.37
- Updated dependencies:
- seance 0.10
- tgbot 0.21
- tokio 1.36
- Updated dependencies:
- seance 0.9
- tgbot 0.20
- tokio 1.35
async fn
in traits:- Removed
TryFromInput::Future
associated type. - Removed
Handler::Future
associated type.
- Removed
- Updated dependencies:
- governor 0.6
- seance 0.8
- tgbot 0.19
- tokio 1.34
- Renamed
add
method ofChain
struct towith
. - Updated
TryFromInput
implementations according to changes in tgbot. - Renamed shortcuts:
AccessExt
:access
towith_access_policy
.PredicateExt
:predicate
towith_predicate
.CommandExt
:command
towith_command
.DialogueExt
:dialogue
towith_dialogue
.
- Extracted a predicate from
DialogueDecorator
. This allows to skip a dialogue handler inChain
using a first-found strategy. As a result, you can now use multiple dialogue handlers. Previously, only one handler could be used, and it had to be the last handler in a chain.
- Updated tgbot version to 0.18.
- Added
Chain::once
method which allows to run first found handler only. - Removed
PrincipalUser
andPrincipalChat
in favor ofUserId
andChatId
.
- Tokio 1.16 and tgbot 0.17 support.
- New handlers API.
- Removed
async_trait
andcarapax-codegen
dependencies. - Removed
Dispatcher
in favor ofApp
andChain
. HandlerResult
is the alias toResult<(), HandlerError>
now.HandlerError
now wrapsBox<dyn Error>
.- Changed signature of
Handler
trait. - Added
HandlerInput
struct containingContext
andUpdate
. - Renamed
TryFromUpdate
trait toTryFromInput
. - Removed
ErrorPolicy
. - Added
Ref<T>
to allow to pass objects from context to handlers directly. - Added
Predicate
handler to allow to wrap handlers with predicates. - Added
CommandPredicate
handler to allow to run a handler only for a specific command.
- Removed
- Replaced
ratelimit_meter
bygovernor
. - Removed i18n support.
- And other breaking changes, see examples for more information.
- Added tokio 1.0 and tgbot 0.12 support.
- Added tgbot 0.11.0 support.
- Added tgbot 0.10.0 support.
- Added tgbot 0.9 support.
- Added tgbot 0.8 support.
- Fixed docs.rs build.
- All
carapax-*
crates was merged into onecarapax
crate. Now you need to enable a corresponding feature in order to get access to features provided by those crates. - Added
Dispatcher::set_error_handler
method. IntroducedLoggingErrorHandler
as default error handler. NowErrorPolicy
is available in public API. So that you can easily override error handler and/or change update propagation behavior. seance
dependency was upgraded to 0.3 version.- Added dialogues support.
HandlerError
now is a type alias forBox<dyn Error>
.CommandDispatcher
was removed, use#[handler(command = "/name")]
instead.#[handler]
proc macro emits a clear error message when function is not async.- Value of
command
argument in#[handler]
proc macro now always requires a leading slash. - Use
TryFrom/TryInto
when converting anUpdate
toSessionId
. We must be sure thatSessionId
always containschat_id
anduser_id
in order to prevent bugs. Command
type was moved totypes
module.- Added tgbot 0.7.0 support.
- Added tgbot 0.6 support.
- Added
CommandDispatcher::new()
method in order to support context without Default impl. - Fixed handler visibility when using proc macro.
- Added async/await support.
- Removed App struct, use Dispatcher instead.
- Function handlers can be implemented using proc macro only.
- Now context is global and generic.
- Added Error variant to HandlerResult.
- Removed CommandHandler trait in favor of Command struct.
- Removed TextRule-based handlers.
App::new()
now takes no arguments.- Added
api
argument toApp::run()
method. App::run()
now returns a future.- Changed API for handlers.
- Removed middlewares support, use handlers instead.
- Removed
Dispatcher
andDispatcherFuture
from public API. - Access middleware moved to carapax-access crate.
- Rate limit middleware moved to carapax-ratelimit crate.
- First release.