Changed default action of /cancel to be handled at message_handler Added keyboard markup to get_account for easier account selection
19 lines
527 B
Python
19 lines
527 B
Python
from telebot.types import (
|
|
InlineKeyboardButton,
|
|
InlineKeyboardMarkup,
|
|
ReplyKeyboardMarkup,
|
|
)
|
|
|
|
|
|
def deletion_markup() -> InlineKeyboardMarkup:
|
|
markup = InlineKeyboardMarkup(row_width=5)
|
|
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
|