From 08db857484e107719c401492acbb07bc9979e329 Mon Sep 17 00:00:00 2001 From: Jerry Date: Sun, 30 Dec 2018 19:04:38 +0800 Subject: [PATCH] telegram does not like keyboard keys to exceed 100 --- tgmsbot.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tgmsbot.py b/tgmsbot.py index 0b20120..65c0cbf 100644 --- a/tgmsbot.py +++ b/tgmsbot.py @@ -122,6 +122,10 @@ def send_keyboard(bot, update, args): if width > 8: width = 8 msg.reply_text('宽度太大,已经帮您设置成8了') + # telegram doesn't like keyboard keys to exceed 100 + if height * width > 100: + msg.reply_text('格数不能超过100') + return ck = check_params(height, width, mines) if ck[0]: board = Board(height, width, mines)