@bot.callback_query_handler(func=lambda c: True)
def inline(c):
    if c.data == 'Расчитать займ':
        bot.edit_message_text(chat_id=c.message.chat.id, message_id=c.message.message_id, text="""*Расчитать займ*
        Введите сумму получения займа
        от *100 000* до *5 000 000*.""", parse_mode='Markdown')
        bot.register_next_step_handler(inline, rasch)
def rasch(m):
    day = str(message_from_user.text)
    workfile = open("fi2.py", "w+")
    workfile.write("b=" + day)
    workfile.close()
    bot.send_message(m.message.chat.id, 'text')
выходит такая ошибка и бот останавливается:
chat_id = message.chat.id
AttributeError: 'function' object has no attribute 'chat'