Open macros0 opened 1 year ago
To work with aiogram 3.x version i added this function to convert paginator.markup to inline keyboard:
def make_inline_keyboard(markup):
markup = json.loads(markup)['inline_keyboard']
rows = []
for row in markup:
buttons = []
for button in row:
buttons.append(types.InlineKeyboardButton(text=button['text'], callback_data=button['callback_data']))
rows.append(buttons)
keyboard = types.InlineKeyboardMarkup(inline_keyboard=rows)
return keyboard
Create examle3.py use aiogram