plugin middlewares; v0.3.10

This commit is contained in:
2026-02-04 17:27:36 +03:00
parent 2e9e82d43b
commit 7a6f135487
3 changed files with 65 additions and 6 deletions

4
bot.go
View File

@@ -251,9 +251,7 @@ func (b *Bot) Run() {
continue
}
ctx := &MsgContext{
Bot: b, Update: u,
}
ctx := &MsgContext{Bot: b, Update: u}
for _, middleware := range b.middlewares {
middleware.Execute(ctx, b.dbContext)
}