(new): rich message support
Golang lint / lint (pull_request) Successful in 1m20s
Golang lint / lint (push) Successful in 4m8s

(fix): runtime reliability
(tests): regression coverage
(doc): v1.1 release notes
This commit is contained in:
2026-08-12 16:34:44 +03:00
parent 48ddf66540
commit f03a081ed6
83 changed files with 6122 additions and 1925 deletions
+6 -4
View File
@@ -122,6 +122,7 @@ type Bot[T AppData] struct {
sessionStore SessionStore // Session store for scene management
sceneScopePriority []SceneScope
sceneLocks sceneKeyLocker
updateOffsetMu sync.Mutex
updateOffset int // Last processed update ID
@@ -191,7 +192,7 @@ func NewBot[T any](opts *BotOpts) (*Bot[T], error) {
api := tgapi.NewAPI(apiOpts)
uploader := tgapi.NewUploader(api)
prefixes := opts.Prefixes
prefixes := append([]string(nil), opts.Prefixes...)
if len(prefixes) == 0 {
prefixes = []string{"/"}
}
@@ -230,10 +231,11 @@ func NewBot[T any](opts *BotOpts) (*Bot[T], error) {
if len(opts.ErrorTemplate) > 0 {
bot.errorTemplate = opts.ErrorTemplate
}
if len(opts.LoggerBasePath) == 0 {
opts.LoggerBasePath = "./"
loggerOpts := *opts
if len(loggerOpts.LoggerBasePath) == 0 {
loggerOpts.LoggerBasePath = "./"
}
bot.initLoggers(opts)
bot.initLoggers(&loggerOpts)
if opts.FileConfigVersion > 0 && opts.FileConfigVersion < ConfigVersion {
bot.logger.Warnln(