noXplode / aiogram_calendar

Date Selection tool & Inline calendar for Aiogram telegram bots
MIT License
151 stars 39 forks source link

callback handler never handle calendar #9

Open ghost opened 1 year ago

ghost commented 1 year ago

Hello! I'm try to use calendar in my project. So, I can show calendar in bot. But when pressing on calendar keys in Telegram then function never handle it. simple_cal_callback.filter() has no effects too. My code:

@disp.callback_query_handler(dialog_cal_callback.filter())
async def process_get_check_in_date_state(query: CallbackQuery, data: dict) -> None:
    selected, date = await SimpleCalendar().process_selection(query, data)
    if selected:
        await query.message.answer(
            f'You selected {date.strftime("%d/%m/%Y")}'
        )
ghost commented 1 year ago

Upd: If I stop script and run again then function start handling. WTF?

noXplode commented 10 months ago

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

o-murphy commented 10 months ago

it seems this is something related to callback handler and filters, did you tried in aiogram 3?

never happen in aiogram3