Answer the question
In order to leave comments, you need to log in
Python Telegram bot. there is a database that is being updated, my task is: I write the ID number to the bot, should I send the data of this ID from the database?
The problem is that when I start the bot.polling() bot, the main cycle stops working.
And without this command, the bot does not work.
for j in range(len(p)):
print(tagid, ' ' , p[j])
bot = telebot.TeleBot('token here')
INPUT_CHANNEL = 'channel'
apihelper.proxy = {
"http": "ip ",
"https": "ip",
}
@bot.message_handler()
def handle(message):
bot.send_message(INPUT_CHANNEL, "\n Request data"+ str(tagid) + " "+ str(rate1))
#elif message.text != p[j]:
# bot.send_message(message.chat.id, "\n There is no such id with "+" "+ message.text + " "+ "no, try another id")
bot.polling(non_stop=True)
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