From fc8fa5a30bf464557051ac22a75ca83de3a29f7b Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Wed, 29 Jun 2022 17:45:07 +0400 Subject: =?UTF-8?q?=D0=9E=D1=81=D0=BD=D0=BE=D0=B2=D0=BD=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=81=D0=BA=D0=B5=D0=BB=D0=B5=D1=82=20=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 keyboards.py (limited to 'keyboards.py') diff --git a/keyboards.py b/keyboards.py new file mode 100644 index 0000000..4f73c55 --- /dev/null +++ b/keyboards.py @@ -0,0 +1,23 @@ +from telegram import ReplyKeyboardMarkup +from abc import ABC + + +BACK = "↩️ Назад" + + +class Keyboard(ABC): + @classmethod + def get_keyboard(cls, telegram_id=None): + pass + + +class MenuKeyboard(Keyboard): + NEW_CLIENT = "📝 Добавить новый клиент" + LIST_CLIENTS = "📚 Вывести список клиентов" + + @classmethod + def get_keyboard(cls, telegram_id=None): + return ReplyKeyboardMarkup([ + [cls.NEW_CLIENT], + [cls.LIST_CLIENTS], + ]) -- cgit v1.2.3