Обновление 4.2

This commit is contained in:
sergey
2025-02-08 19:12:38 +07:00
parent 6e2e7bdc0f
commit ef6906b240
39 changed files with 730 additions and 553 deletions

View File

@@ -1,13 +1,13 @@
# BotCode/keyboards/reply_kb/help_kb.py
# Создание клавиатуры для сообщения: "Помогите!"
# Создает небольшую числовую клавиатуру для тестов
from aiogram import Router, F
from aiogram.types import ReplyKeyboardMarkup, KeyboardButton
from aiogram.utils.keyboard import ReplyKeyboardBuilder
from BotLibrary import rkb
# Создание роутера и настройка экспорта модулей
__all__ = ("router", "get_help_kb", "kb_text",)
kb_text = "HelpKb"
__all__ = ("router", "get_help_kb")
router = Router(name="help_kb_router")
@@ -18,15 +18,13 @@ def get_help_kb() -> ReplyKeyboardMarkup:
"1", "2", "3",
"4", "5", "6",
"7", "8", "9",
"0",
"0",
]
# Создание кнопки каждого числа по отдельности
buttons_row = [KeyboardButton(text=num) for num in numbers]
builder = ReplyKeyboardBuilder()
for num in numbers:
builder.button(text=num)
builder.adjust(3)
builder.row(buttons_row[3], buttons_row[9])
builder.add(buttons_row[-1])
rkb.button(text=num)
return builder.as_markup(resize_keyboard=True)
rkb.adjust(3)
return rkb.as_markup(resize_keyboard=True)