29 lines
821 B
Python
29 lines
821 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()
|
|
inline_builder.row(
|
|
InlineKeyboardButton(
|
|
text="📠 Callback",
|
|
callback_data=callbacks.CExample.example,
|
|
),
|
|
InlineKeyboardButton(
|
|
text="📠 Callback Factory",
|
|
callback_data=factory.ExampleFactory(example='Example 2').pack(),
|
|
),
|
|
InlineKeyboardButton(
|
|
text="📠 State",
|
|
callback_data=callbacks.CExample.state,
|
|
),
|
|
)
|
|
return inline_builder.as_markup(resize_keyboard=True)
|