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

       if all questions have been answered, switch to the SUBMIT state, send the
       proper answer and the 'Submit, Delete' markup."""
    ans = qa.answer_insert(message)
    markup = telebot.types.InlineKeyboardMarkup()

    if ans == answers['ALL_ANSWERED']:
        state.save_state(message, state.states['SUBMIT'])
        markup.add(telebot.types.InlineKeyboardButton('Submit', callback_data='submit'),
                   telebot.types.InlineKeyboardButton('Delete', callback_data='delete'))

    bot.send_message(message.chat.id, ans, parse_mode='HTML', reply_markup=markup)
If the bot state for a message/call sender is ANSWER.

       if all questions have been answered, switch to the SUBMIT state, send the
       proper answer and the 'Submit, Delete' markup.
If the bot state for a message/call sender is ANSWER.
if all questions have been answered, switch to the SUBMIT state, send the
proper answer and the 'Submit, Delete' markup.
If the bot state for a message / call sender is ANSWER . if all questions have been answered switch to the SUBMIT state send the proper answer and the ' Submit Delete ' markup .
def message_handler(message):
    ans = qa.answer_insert(message)
    markup = telebot.types.InlineKeyboardMarkup()
    if ans == answers['ALL_ANSWERED']:
        state.save_state(message, state.states['SUBMIT'])
        markup.add(telebot.types.InlineKeyboardButton('Submit', callback_data='submit'),
                   telebot.types.InlineKeyboardButton('Delete', callback_data='delete'))
    bot.send_message(message.chat.id, ans, parse_mode='HTML', reply_markup=markup)
def message_handler ( message ) : ans = qa . answer_insert ( message ) markup = telebot . types . InlineKeyboardMarkup ( ) if ans == answers [ 'ALL_ANSWERED' ] : state . save_state ( message , state . states [ 'SUBMIT' ] ) markup . add ( telebot . types . InlineKeyboardButton ( 'Submit' , callback_data = 'submit' ) , telebot . types . InlineKeyboardButton ( 'Delete' , callback_data = 'delete' ) ) bot . send_message ( message . chat . id , ans , parse_mode = 'HTML' , reply_markup = markup )
If the bot state for a message/call sender is ANSWER.
If the bot state for a message / call sender is ANSWER .
"""If the bot state for a message/call sender is ANSWER.

       if all questions have been answered, switch to the SUBMIT state, send the
       proper answer and the 'Submit, Delete' markup."""
message