replace-bot/keyboards/inline/keyboard.py

22 lines
519 B
Python
Raw Normal View History

2022-02-16 18:13:44 +03:00
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")
]
]
)