Answer the question
In order to leave comments, you need to log in
How to implement input to variable in python-telegram-bot?
How to implement input to variable in python-telegram-bot?
If possible please send a sample code.
Answer the question
In order to leave comments, you need to log in
I don't quite understand what you're talking about, but I'll leave it here.
import telebot
bot = telebot.TeleBot('token')
@bot.message_handler(content_types=['text'])
def start(message):
if message.text == '/start':
bot.send_message(message.from_user.id, "Введи переменную");
bot.register_next_step_handler(message, get_var);
def get_var(message):
global var;
var = message.text;
print(var)
bot.polling()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question