bot.py
def callback_handler(call):
    """If the bot state for a message/call sender is TRANSIT.

       if call.data is 'yes', switch to the MEDIA1 state, send the assigned answer

       elif call.data is 'no', switch to the ANSWER state, send the assigned answer."""
    bot.answer_callback_query(call.id)

    if call.data == 'yes':
        state.save_state(call, state.states['MEDIA1'])
        ans = answers['ATTACH_MEDIA']
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
    elif call.data == 'no':
        state.save_state(call, state.states['ANSWER'])
        ans = answers['ANSWER_Q1'] % qa.get_question(call)
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
If the bot state for a message/call sender is TRANSIT.

       if call.data is 'yes', switch to the MEDIA1 state, send the assigned answer

       elif call.data is 'no', switch to the ANSWER state, send the assigned answer.
If the bot state for a message/call sender is TRANSIT.
if call.data is 'yes', switch to the MEDIA1 state, send the assigned answer

elif call.data is 'no', switch to the ANSWER state, send the assigned answer.
If the bot state for a message / call sender is TRANSIT . if call . data is ' yes ' switch to the MEDIA1 state send the assigned answer elif call . data is ' no ' switch to the ANSWER state send the assigned answer .
def callback_handler(call):
    bot.answer_callback_query(call.id)
    if call.data == 'yes':
        state.save_state(call, state.states['MEDIA1'])
        ans = answers['ATTACH_MEDIA']
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
    elif call.data == 'no':
        state.save_state(call, state.states['ANSWER'])
        ans = answers['ANSWER_Q1'] % qa.get_question(call)
        bot.send_message(call.message.chat.id, ans, parse_mode='HTML')
def callback_handler ( call ) : bot . answer_callback_query ( call . id ) if call . data == 'yes' : state . save_state ( call , state . states [ 'MEDIA1' ] ) ans = answers [ 'ATTACH_MEDIA' ] bot . send_message ( call . message . chat . id , ans , parse_mode = 'HTML' ) elif call . data == 'no' : state . save_state ( call , state . states [ 'ANSWER' ] ) ans = answers [ 'ANSWER_Q1' ] % qa . get_question ( call ) bot . send_message ( call . message . chat . id , ans , parse_mode = 'HTML' )
If the bot state for a message/call sender is TRANSIT.
If the bot state for a message / call sender is TRANSIT .
"""If the bot state for a message/call sender is TRANSIT.

       if call.data is 'yes', switch to the MEDIA1 state, send the assigned answer

       elif call.data is 'no', switch to the ANSWER state, send the assigned answer."""
call