(new): v1.2 release
Golang lint / lint (push) Successful in 11m32s

This commit is contained in:
2026-08-19 14:58:25 +03:00
parent f03a081ed6
commit 29b208eeec
79 changed files with 7301 additions and 2060 deletions
+20 -10
View File
@@ -34,16 +34,26 @@ type botOptsFileJSONAPI struct {
// BotOptsFileJSON is the JSON file representation of BotOpts.
type BotOptsFileJSON struct {
Version int `json:"version"`
Token string `json:"token"`
UpdateTypes []tgapi.UpdateType `json:"update_types"`
Debug bool `json:"debug"`
ErrorTemplate string `json:"error_template"`
Prefixes []string `json:"prefixes"`
Logger botOptsFileJSONLogger `json:"logger"`
API botOptsFileJSONAPI `json:"api"`
StrictPayloadType bool `json:"strict_payload_type"`
MaxWorkers int `json:"max_workers"`
// Version identifies the JSON configuration format version.
Version int `json:"version"`
// Token is the Telegram bot token.
Token string `json:"token"`
// UpdateTypes limits the update kinds requested from Telegram.
UpdateTypes []tgapi.UpdateType `json:"update_types"`
// Debug enables debug logging.
Debug bool `json:"debug"`
// ErrorTemplate formats user-facing handler errors.
ErrorTemplate string `json:"error_template"`
// Prefixes contains accepted command prefixes.
Prefixes []string `json:"prefixes"`
// Logger contains file logging options.
Logger botOptsFileJSONLogger `json:"logger"`
// API contains Telegram client and rate-limit options.
API botOptsFileJSONAPI `json:"api"`
// StrictPayloadType requires callback payloads to use the configured encoding.
StrictPayloadType bool `json:"strict_payload_type"`
// MaxWorkers limits concurrent update handlers.
MaxWorkers int `json:"max_workers"`
}
// BotOptsFileJSONCodec encodes and decodes BotOpts using BotOptsFileJSON.