from aiogram.types import KeyboardButton, InlineKeyboardButton, WebAppInfo
from aiogram.utils.keyboard import ReplyKeyboardBuilder, InlineKeyboardBuilder
from Lexicon.lexicon_ru import LEXICON_INLINE
def create_key(width: int, *args: str, **kwargs: str):
# Инициализация билдера для клавиатуры
menu: ReplyKeyboardBuilder = ReplyKeyboardBuilder()
# Инициализируем список кнопок
buttons: list[KeyboardButton] = []
if args:
for button in args:
buttons.append(KeyboardButton(text=button))
if kwargs:
for key, val in kwargs.items():
buttons.append(KeyboardButton(text=val))
menu.row(*buttons, width=width)
return menu.as_markup()
def create_inline_key(width: int, button1: str | None = None, *args: str, **kwargs: str):
# Инициализация билдера для клавиатуры
kb_builder: InlineKeyboardBuilder = InlineKeyboardBuilder()
# Инициализируем список кнопок
buttons: list[InlineKeyboardButton] = []
if args: