replace-bot/keyboards/inline/keyboard.py
2022-02-16 17:13:44 +02:00

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")
]
]
)