22 lines
519 B
Python
22 lines
519 B
Python
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
|
|
|
|
|
|
def menu(data: dict) -> InlineKeyboardMarkup:
|
|
markup = InlineKeyboardMarkup()
|
|
for k in data:
|
|
if k.replace(" ", "") != "":
|
|
markup.add(
|
|
InlineKeyboardButton(
|
|
k, callback_data=str(k)
|
|
)
|
|
)
|
|
return markup
|
|
|
|
|
|
cancel_button = InlineKeyboardMarkup(inline_keyboard=[
|
|
[
|
|
InlineKeyboardButton("Назад", callback_data="back")
|
|
]
|
|
]
|
|
)
|