28 lines
785 B
Python
28 lines
785 B
Python
from aiogram.utils.keyboard import InlineKeyboardBuilder
|
|
from aiogram.types import (
|
|
InlineKeyboardButton,
|
|
InlineKeyboardMarkup,
|
|
)
|
|
|
|
|
|
from data import callbacks, factory
|
|
|
|
|
|
def example_callback() -> InlineKeyboardMarkup:
|
|
"""Выберите нужный тип"""
|
|
inline_builder = InlineKeyboardBuilder()
|
|
list_build: tuple[InlineKeyboardButton] = (
|
|
InlineKeyboardButton(
|
|
text="📠 Callback",
|
|
callback_data=callbacks.CExample.example,
|
|
),
|
|
InlineKeyboardButton(
|
|
text="📠 Callback Factory | State",
|
|
callback_data=factory.ExampleFactory(example='Example 2').pack(),
|
|
),
|
|
)
|
|
for i in list_build:
|
|
inline_builder.row(i)
|
|
|
|
return inline_builder.as_markup(resize_keyboard=True)
|