From 0e1e3cbf6eb1637222ede2b21bb40b2e5cddee43 Mon Sep 17 00:00:00 2001 From: Russia9 Date: Thu, 5 May 2022 22:32:16 +0300 Subject: [PATCH] a --- bot/handlers/list.go | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/bot/handlers/list.go b/bot/handlers/list.go index 481faf8..94afda9 100644 --- a/bot/handlers/list.go +++ b/bot/handlers/list.go @@ -47,46 +47,46 @@ func Account(ctx telebot.Context) error { markup.Inline( markup.Row( - markup.Data(fmt.Sprintf("Еда: %s", utils.BoolEmoji(account.Eat)), "edit", id, "eat"), - markup.Data(fmt.Sprintf("Еда на 200: %s", utils.BoolEmoji(account.Eat200)), "edit", id, "eat_200"), + markup.Data(fmt.Sprintf("%s Еда", utils.BoolEmoji(account.Eat)), "edit", id, "eat"), + markup.Data(fmt.Sprintf("%s Еда на 200", utils.BoolEmoji(account.Eat200)), "edit", id, "eat_200"), ), markup.Row( markup.Data(fmt.Sprintf("Команда еды: %s", account.EatCommand), "edit", id, "eat_command"), markup.Data(fmt.Sprintf("Шанс на еду: %d", account.EatChance), "edit", id, "eat_chance"), ), markup.Row( - markup.Data(fmt.Sprintf("Лвлап: %s", utils.BoolEmoji(account.Levelup)), "edit", id, "levelup"), - markup.Data(fmt.Sprintf("Скилл: %s", utils.BoolLevelup(account.LevelupSkill)), "edit", id, "levelup_skill"), + markup.Data(fmt.Sprintf("%s Лвлап", utils.BoolEmoji(account.Levelup)), "edit", id, "levelup"), + markup.Data(fmt.Sprintf("%s Скилл", utils.BoolLevelup(account.LevelupSkill)), "edit", id, "levelup_skill"), ), markup.Row( - markup.Data(fmt.Sprintf("Пины: %s", utils.BoolEmoji(account.Pin)), "edit", id, "pin"), + markup.Data(fmt.Sprintf("%s Пины", utils.BoolEmoji(account.Pin)), "edit", id, "pin"), markup.Data(fmt.Sprintf("Чат: %d", account.PinChat), "edit", id, "pin_chat"), markup.Data(fmt.Sprintf("Пауза: %.1f", account.PinDelay), "edit", id, "pin_delay"), markup.Data(fmt.Sprintf("Шанс: %d", account.PinChance), "edit", id, "pin_chance"), ), markup.Row( - markup.Data(fmt.Sprintf("Репорты: %s", utils.BoolEmoji(account.Report)), "edit", id, "report"), + markup.Data(fmt.Sprintf("%s Репорты", utils.BoolEmoji(account.Report)), "edit", id, "report"), markup.Data(fmt.Sprintf("Чат: %d", account.ReportChat), "edit", id, "report_chat"), markup.Data(fmt.Sprintf("Пауза: %.1f", account.ReportDelay), "edit", id, "report_delay"), markup.Data(fmt.Sprintf("Шанс: %d", account.ReportChance), "edit", id, "report_chance"), ), markup.Row( - markup.Data(fmt.Sprintf("Мобы: %s", utils.BoolEmoji(account.Mob)), "edit", id, "mob"), + markup.Data(fmt.Sprintf("%s Мобы", utils.BoolEmoji(account.Mob)), "edit", id, "mob"), markup.Data(fmt.Sprintf("Пауза: %.1f", account.MobDelay), "edit", id, "mob_delay"), markup.Data(fmt.Sprintf("Шанс: %d", account.MobChance), "edit", id, "mob_chance"), ), markup.Row( - markup.Data(fmt.Sprintf("Акула: %s", utils.BoolEmoji(account.Shark)), "edit", id, "shark"), + markup.Data(fmt.Sprintf("%s Акула", utils.BoolEmoji(account.Shark)), "edit", id, "shark"), markup.Data(fmt.Sprintf("Пауза: %.1f", account.SharkDelay), "edit", id, "shark_delay"), markup.Data(fmt.Sprintf("Команда: %s", utils.SharkEmoji(account.SharkTeam)), "edit", id, "shark_team"), ), markup.Row( - markup.Data(fmt.Sprintf("Сон: %s", utils.BoolEmoji(account.Sleep)), "edit", id, "sleep"), - markup.Data(fmt.Sprintf("Сон в отеле? %s", utils.BoolEmoji(account.SleepHotel)), "edit", id, "sleep_hotel"), + markup.Data(fmt.Sprintf("%s Сон", utils.BoolEmoji(account.Sleep)), "edit", id, "sleep"), + markup.Data(fmt.Sprintf("%s Сон в отеле?", utils.BoolEmoji(account.SleepHotel)), "edit", id, "sleep_hotel"), ), markup.Row( - markup.Data(fmt.Sprintf("Слив моты: %s", utils.BoolEmoji(account.Motivation)), "edit", id, "motivation"), - markup.Data(fmt.Sprintf("Слив по кд: %s", utils.BoolEmoji(account.MotivationKD)), "edit", id, "motivation_kd"), + markup.Data(fmt.Sprintf("%s Слив моты", utils.BoolEmoji(account.Motivation)), "edit", id, "motivation"), + markup.Data(fmt.Sprintf("%s Слив по кд", utils.BoolEmoji(account.MotivationKD)), "edit", id, "motivation_kd"), ), markup.Row( markup.Data(fmt.Sprintf("Команда для слива: %s", account.MotivationCommand), "edit", id, "motivation_command"), @@ -174,9 +174,6 @@ func EditInput(ctx telebot.Context, data []string) error { switch data[1] { case "eat_command": - if !regexp.MustCompile("/.*").MatchString(ctx.Text()) { - return ctx.Send("Неправильный формат") - } account.EatCommand = ctx.Text() case "eat_chance": account.EatChance, err = strconv.Atoi(ctx.Text())