Explorar o código

optimize go/tg/l1.go

root hai 3 semanas
pai
achega
56e6a40230
Modificáronse 2 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      go/tg/l1.go
  2. BIN=BIN
      go/tg/output/l1

+ 2 - 1
go/tg/l1.go

@@ -27,8 +27,9 @@ func main() {
 		if update.Message == nil {
 			continue
 		}
+		id := update.Message.Chat.ID
 		if update.Message.IsCommand() && update.Message.Command() == "start" {
-			msg := tgbotapi.NewMessage(update.Message.Chat.ID, "Сергей")
+			msg := tgbotapi.NewMessage(id, "Сергей")
 			bot.Send(msg)
 		}
 	}

BIN=BIN
go/tg/output/l1