ser = CallbackData('set_about', "ids")
@dp.callback_query_handler()
async def callbacks(call: types.CallbackQuery):
stacks = await st.stack_ids(id=call.from_user.id)
s = []
for i in stacks:
s.append(str(i[0]))
if call.data in s:
se = InlineKeyboardMarkup(one_time_keyboard=True)
se.add(InlineKeyboardButton('Изменить описание', callback_data=ser.new(ids=call.data)))
se.add(InlineKeyboardButton('описание', callback_data='da'))
stack_id = await st.stack_id(call.data)
if stack_id[7] == 1:
await bot.send_photo(chat_id=call.from_user.id,
photo=stack_id[6],
caption=await info_stack(call.data),
reply_markup=se)
elif stack_id[7] == 2:
await bot.send_video(chat_id=call.from_user.id,
video=stack_id[6],
caption=await info_stack(call.data),
reply_markup=se)
@dp.callback_query_handler(ser.filter())
async def set1call(call: types.CallbackQuery, callback_data: dict):
id = callback_data.get("ids")
await bot.send_message(chat_id=call.from_user.id, text=id)
почему не работает callbackdata?