28 lines
785 B
Python
Raw Normal View History

2025-03-29 01:46:56 +03:00
from aiogram.utils.keyboard import InlineKeyboardBuilder
from aiogram.types import (
InlineKeyboardButton,
InlineKeyboardMarkup,
)
from data import callbacks, factory
def example_callback() -> InlineKeyboardMarkup:
"""Выберите нужный тип"""
inline_builder = InlineKeyboardBuilder()
2025-03-29 17:11:19 +03:00
list_build: tuple[InlineKeyboardButton] = (
2025-03-29 01:46:56 +03:00
InlineKeyboardButton(
text="📠 Callback",
callback_data=callbacks.CExample.example,
),
InlineKeyboardButton(
2025-03-29 17:11:19 +03:00
text="📠 Callback Factory | State",
2025-03-29 01:46:56 +03:00
callback_data=factory.ExampleFactory(example='Example 2').pack(),
),
)
2025-03-29 17:11:19 +03:00
for i in list_build:
inline_builder.row(i)
2025-03-29 01:46:56 +03:00
return inline_builder.as_markup(resize_keyboard=True)