(new): v1.2 release
Golang lint / lint (push) Successful in 11m32s

This commit is contained in:
2026-08-19 14:58:25 +03:00
parent f03a081ed6
commit 29b208eeec
79 changed files with 7301 additions and 2060 deletions
+16 -12
View File
@@ -51,6 +51,7 @@ func (bot *Bot[T]) handle(parentCtx context.Context, u *tgapi.Update) {
draftProvider: bot.draftProvider,
sceneRuntime: bot,
observer: bot.observer,
eventEmitter: bot.safeEmitEvent,
payloadType: bot.payloadType,
botID: bot.userID,
ctx: ctx,
@@ -81,7 +82,7 @@ func (bot *Bot[T]) handle(parentCtx context.Context, u *tgapi.Update) {
sceneHandled, err := bot.tryHandleScene(msgCtx)
if err != nil {
bot.logger.Errorln(err)
msgCtx.error(err)
bot.safeEmitEvent(ctx, UpdateHandledEvent{
UpdateID: u.UpdateID,
UpdateType: u.Type,
@@ -90,17 +91,20 @@ func (bot *Bot[T]) handle(parentCtx context.Context, u *tgapi.Update) {
Duration: time.Since(startTime),
Handled: false,
})
bot.safeEmitEvent(ctx, ErrorEvent{
UpdateID: u.UpdateID,
UpdateType: u.Type,
Plugin: "bot",
HandlerKind: HandlerSceneKind,
HandlerName: "tryHandleScene",
FromID: msgCtx.FromID,
ChatID: msgCtx.ChatID,
Err: err,
UserFacing: false,
})
var reported *reportedSceneError
if !errors.As(err, &reported) {
bot.safeEmitEvent(ctx, ErrorEvent{
UpdateID: u.UpdateID,
UpdateType: u.Type,
Plugin: "bot",
HandlerKind: HandlerSceneKind,
HandlerName: "tryHandleScene",
FromID: msgCtx.FromID,
ChatID: msgCtx.ChatID,
Err: err,
UserFacing: IsUserError(err),
})
}
return
}
if sceneHandled {