Quality of life changes

Changed default action of /cancel to be handled at message_handler
Added keyboard markup to get_account for easier account selection
This commit is contained in:
2022-12-29 15:38:38 +03:00
parent d4c50432d7
commit d5d87a8f3b
4 changed files with 31 additions and 13 deletions

View File

@ -1,4 +1,8 @@
from telebot.types import InlineKeyboardButton, InlineKeyboardMarkup
from telebot.types import (
InlineKeyboardButton,
InlineKeyboardMarkup,
ReplyKeyboardMarkup,
)
def deletion_markup() -> InlineKeyboardMarkup:
@ -6,3 +10,9 @@ def deletion_markup() -> InlineKeyboardMarkup:
button = InlineKeyboardButton("Удалить сообщение", callback_data="DELETE")
markup.add(button)
return markup
def account_markup(account_names: list[str]) -> ReplyKeyboardMarkup:
markup = ReplyKeyboardMarkup(resize_keyboard=True, row_width=2)
markup.add(*account_names)
return markup