Answer the question
In order to leave comments, you need to log in
What is the error in the bot's telegram code. I'm trying to set a variable through a message.?
Here is the code itself:
@bot.message_handler(func=lambda message: message.chat.id not in users)
def CheckUser(message):
bot.send_message(message.chat.id, "Привет.")
@bot.message_handler(content_types=['text'])
def handle_text(message):
bot.send_message(message.chat.id, "Введите номер в формате +7XXXXXXXXXX")
@bot.message_handler(content_types=['text'])
def handle_text(message):
phone = message.text
bot.polling(none_stop=True, interval=0)
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