v1.0.0 beta 9

This commit is contained in:
2026-03-06 11:59:17 +03:00
parent 6cf3355a36
commit 9895edf966
19 changed files with 731 additions and 456 deletions

5
bot.go
View File

@@ -74,6 +74,7 @@ type Bot[T DbContext] struct {
token string
debug bool
errorTemplate string
username string
logger *slog.Logger
RequestLogger *slog.Logger
@@ -140,6 +141,10 @@ func NewBot[T any](opts *BotOpts) *Bot[T] {
_ = bot.Close()
bot.logger.Fatal(err)
}
bot.username = Val(u.Username, "")
if bot.username == "" {
bot.logger.Warn("Can't get bot username. Named command wouldn't work!")
}
bot.logger.Infof("Authorized as %s\n", u.FirstName)
return bot