diff --git a/src/controllers/duelController.go b/src/controllers/duelController.go index 813aa04..476855c 100644 --- a/src/controllers/duelController.go +++ b/src/controllers/duelController.go @@ -48,7 +48,7 @@ func (s *DuelController) StartMatch(c tele.Context) error { if strings.Contains(c.Text(), " ") { text = strings.Split(c.Text(), " ")[1] - fmt.Println("new command", text) + fmt.Println("New match", text) } else { return c.Send("Некоректная команда, используйте /duel <сумма>") } @@ -57,11 +57,11 @@ func (s *DuelController) StartMatch(c tele.Context) error { if err != nil { return c.Send("Некорректная команда, используйте /duel <сумма>") } else { - s.Summ = summ - } - - if summ <= 0 { - return c.Send("Некорректная сумма, используйте положительное значение!") + if summ <= 0 { + return c.Send("Некорректная сумма, используйте положительное значение!") + } else { + s.Summ = summ + } } s.Inited = true