@SoreMix, def propis_step(message, user_info):
user_info['propisi'] = message.text
user_info['propisi'] = message.text
doc = DocxTemplate("pko.docx")
context = {'org': user_info['orga'],
'number': user_info['numbr'],
'day': user_info['day'],
'mes': user_info['mes'],
'year': user_info['year'],
'fio': user_info['name'],
'ocnovanie': user_info['ocn'],
'symmarub': user_info['sum'],
'propis': user_info['propisi'],
'vtom': ''}
doc.render(context)
doc.save("шаблон-final1233.docx")
# sendDocument
doc = open('/tmp/шаблон-final1233.docx', 'rb')
tb.send_document(chat_id, doc)
tb.send_document(chat_id, "FILEID"
bot.polling()
import telebot
from telebot import types
TOKEN = '...'
@bot.message_handler(content_types=['text']
def main(message):
if message.text == 'Посчитай за меня':
msg = bot.send_message(message.chat.id, 'ОК')
bot.register_next_step_handler(msg, sum)
def sum(message):
if message.text:
a = message.text[0]
b = message.text[1]
bot.send_message(message.chat.id, a + b)