Answer the question
In order to leave comments, you need to log in
Unable to send TelegramBOT message?
Unable to send message.
Here is the message code:
def getRegData(user, title, name):
t = Template('$title *$name* \n Город: *$userCity* \n ФИО: *$fullname* \n Телефон: *$phone* \n Почта: *$email* \n Viber: *$viber*')
return t.substitute({
'title': title,
'name': name,
'userCity': user.city,
'fullname': user.fullname,
'phone': user.phone,
'email': user.email,
'viber': user.viber,
})
@bot.message_handler(content_types=['text']
def send_text(message)
if message.text == 'Отправить!':
bot.send_message(message.chat.id, getRegData(user, title, name)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question