I am writing a telegram bot using aiogram. Help to implement the code to show the user a message with inline keyboard of 13 buttons and the user has an opportunity to choose 3 options and on the basis of this choice he will get a message in which will meet the selected options. In the structure of my project I put in a separate file the code with the keyboard and a separate file with handlers. keypad code:
`from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
ikb_calc_exam = InlineKeyboardMarkup(row_width=3)
ib_calc_geography = InlineKeyboardButton(text='geography',
callback_data='cd_calc_geography'
ib_calc_literature = InlineKeyboardButton(text='literature',
callback_data='cd_calc_literature')
ib_calc_chemistry = InlineKeyboardButton(text='chemistry',
callback_data='cd_calc_chemistry')
ib_calc_russian = InlineKeyboardButton(text='russian',
callback_data='cd_calc_russian')
ib_calc_mathematics = InlineKeyboardButton(text='mathematics',
callback_data='cd_calc_mathematics')
ib_calc_history = InlineKeyboardButton(text='history',
callback_data='cd_calc_history')
ib_calc_physics = InlineKeyboardButton(text='physics',
callback_data='cd_calc_physics')
ib_calc_socials = InlineKeyboardButton(text='socials',
callback_data='cd_calc_socials')
ib_calc_biology = InlineKeyboardButton(text='biology',
callback_data='cd_calc_biology')
ib_calc_international = InlineKeyboardButton(text='international',
callback_data='cd_calc_international')
ib_calc_informatics = InlineKeyboardButton(text='informatics',
callback_data='cd_calc_informatics')
ib_calc_professional = InlineKeyboardButton(text='professional',
callback_data='cd_calc_professional')
ib_calc_creavity = InlineKeyboardButton(text='creavity',
callback_data='cd_calc_creavity')
ikb_calc_exam.add(ib_calc_geography).add(ib_calc_literature).add(ib_calc_chemistry).add(ib_calc_russian).add(
ib_calc_mathematics).add(ib_calc_history).add(ib_calc_physics).add(ib_calc_socials).add(ib_calc_biology).add(
ib_calc_international).add(ib_calc_informatics).add(ib_calc_professional).add(ib_calc_creavity)`
handlers code:
`from aiogram import types, Dispatcher
from misc import bot, dp
from Keyboard.Keyboard_calc_exam import ikb_calc_exam
from aiogram.utils.callback_data import CallbackData
@dp.message_handler(commands=['calc_exam'])
async def calc_exam(message: types.Message):
await bot.send_message(chat_id=message.from_user.id,
text='<em>Choose three options</em>',
parse_mode="HTML",
reply_markup=keyboard)
await message.delete()
cd = CallbackData('geographi', 'literature', 'chemistry', 'russian', 'mathematics', 'history', 'physics', 'socials',
'biology', 'international', 'informatics', 'professional', 'creavity')
@dp.callback_query_handler(lambda callback_query: callback_query.data == 'cd_calc_geographi')
async def ikb_cb_geographi(callback: types.CallbackQuery):
await callback.answer()`
I understand that it is necessary to use callback_data but all attempts to implement this have failed.