From f30d3e9a0756ddc7d66ab6d26a1f76024d58eca3 Mon Sep 17 00:00:00 2001 From: Rykov7 Date: Mon, 23 Jan 2023 18:46:24 +0300 Subject: [PATCH] fix bug --- app/bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/bot.py b/app/bot.py index 3e7130e..e42f6c3 100644 --- a/app/bot.py +++ b/app/bot.py @@ -78,7 +78,7 @@ def send_rules(message): markup = types.InlineKeyboardMarkup() markup.add(RULES, row_width=1) args = message.text.split() - if len(args) > 1 and args[-1].isdigit(): + if len(args) > 1 and args[-1].isdigit() and 0 < int(args[-1]): send_or_reply(message, f'Правило {args[-1]}\n{rules.get_rule(args[-1])}', reply_markup=markup) else: send_or_reply(message, 'Почитай', reply_markup=markup)