v1.0.0 beta 13

This commit is contained in:
2026-03-12 14:15:42 +03:00
parent b1b0cbdfbd
commit 0574222608
7 changed files with 17 additions and 19 deletions

4
bot.go
View File

@@ -277,7 +277,7 @@ func NewBot[T any](opts *BotOpts) *Bot[T] {
if bot.username == "" {
bot.logger.Warn("Can't get bot username. Named command handlers won't work!")
}
bot.logger.Infof("Authorized as %s (@%s)\n", u.FirstName, u.Username)
bot.logger.Infof("Authorized as %s (@%s)\n", u.FirstName, Val(u.Username, "unknown"))
return bot
}
@@ -611,7 +611,7 @@ func (bot *Bot[T]) RunWithContext(ctx context.Context) {
for _, u := range updates {
select {
case bot.updateQueue <- u:
case bot.updateQueue <- &u:
case <-ctx.Done():
return
}