def buttons(update, context):
query = update.callback_query
query.answer()
if query.data == 'cat':
context.bot.answer_callback_query(callback_query_id=query.id, text='you chose cat', show_alert=True)
elif query.data == 'dog':
context.bot.answer_callback_query(callback_query_id=query.id, text='you chose dog', show_alert=True)