{"record":{"id":"4e0b0ebb1b5a4377","repo":"sipeed/picoclaw","slug":"failed-to-create-telegram-bot-w","errorCode":null,"errorMessage":"failed to create telegram bot: %w","messagePattern":"failed to create telegram bot: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/channels/telegram/telegram.go","lineNumber":118,"sourceCode":"\t\t\t},\n\t\t}))\n\t} else if os.Getenv(\"HTTP_PROXY\") != \"\" || os.Getenv(\"HTTPS_PROXY\") != \"\" {\n\t\t// Use environment proxy if configured\n\t\topts = append(opts, telego.WithHTTPClient(&http.Client{\n\t\t\tTransport: &http.Transport{\n\t\t\t\tProxy: http.ProxyFromEnvironment,\n\t\t\t},\n\t\t}))\n\t}\n\n\tif baseURL := strings.TrimRight(strings.TrimSpace(telegramCfg.BaseURL), \"/\"); baseURL != \"\" {\n\t\topts = append(opts, telego.WithAPIServer(baseURL))\n\t}\n\topts = append(opts, telego.WithLogger(logger.NewLogger(\"telego\")))\n\n\tbot, err := telego.NewBot(telegramCfg.Token.String(), opts...)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"failed to create telegram bot: %w\", err)\n\t}\n\n\tbase := channels.NewBaseChannel(\n\t\tchannelName,\n\t\ttelegramCfg,\n\t\tbus,\n\t\tbc.AllowFrom,\n\t\tchannels.WithMaxMessageLength(4000),\n\t\tchannels.WithGroupTrigger(bc.GroupTrigger),\n\t\tchannels.WithReasoningChannelID(bc.ReasoningChannelID),\n\t)\n\n\tch := &TelegramChannel{\n\t\tBaseChannel: base,\n\t\tbot:         bot,\n\t\tbc:          bc,\n\t\tchatIDs:     make(map[string]int64),\n\t\ttgCfg:       telegramCfg,","sourceCodeStart":100,"sourceCodeEnd":136,"githubUrl":"https://github.com/sipeed/picoclaw/blob/49183d7e8daed0dba89ddbb6fcb60089401d9680/pkg/channels/telegram/telegram.go#L100-L136","documentation":"Error \"failed to create telegram bot: %w\" thrown in sipeed/picoclaw.","triggerScenarios":"Thrown at pkg/channels/telegram/telegram.go:118 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"49183d7e8daed0dba89ddbb6fcb60089401d9680","analyzedAt":"2026-08-15T21:55:41.315Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}