(new): rich message support
(fix): runtime reliability (tests): regression coverage (doc): v1.1 release notes
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user