diff --git a/app/monitor/telegram.go b/app/monitor/telegram.go index 658c4e5..1922c03 100644 --- a/app/monitor/telegram.go +++ b/app/monitor/telegram.go @@ -9,15 +9,21 @@ import ( var err error func BotStart(version string) { - var BotApi = telegram.GetBotApi() - if BotApi == nil { + var botApi = telegram.GetBotApi() + if botApi == nil { return } + _, err = botApi.MakeRequest("deleteWebhook", tgbotapi.Params{}) + if err != nil { + + log.Error("TG Bot deleteWebhook Error:", err) + } + u := tgbotapi.NewUpdate(0) u.Timeout = 60 - updates := BotApi.GetUpdatesChan(u) + updates := botApi.GetUpdatesChan(u) if err != nil { log.Error("TG Bot GetUpdatesChan Error:", err) diff --git a/main/main.go b/main/main.go index da1f5ee..126632c 100644 --- a/main/main.go +++ b/main/main.go @@ -12,7 +12,7 @@ import ( ) // Version 版本号说明 1.0.0 代表主版本号.功能版本号.修订号 -const Version = "1.9.22" +const Version = "1.9.23" func main() { if err := model.Init(); err != nil {