Answer the question
In order to leave comments, you need to log in
Why doesn't the bot answer appear in telegram?
The bot should send a response
@bot.message_handler(content_types=['www'])
def find_answer(message):
markup = types.ReplyKeyboardMarkup(True, True)
item_b = types.KeyboardButton("w")
markup.add(item_b)
item_g = types.KeyboardButton("ww")
markup.add(item_g)
item_v = types.KeyboardButton("www")
markup.add(item_v)
bot.send_message(message.from_user.id, "Choose, what you need", reply_markup=markup)
x = message.location.longitude #долгота
y = message.location.latitude #широта
@bot.message_handler(content_types=['text'])
def handle_text(message):
if message.text == "w":
bot.send_message(message.from_user.id, "Результат 1")
if message.text == 'I need...':
bot.send_message(message.from_user.id, "Where are you?", reply_markup=markup)
Answer the question
In order to leave comments, you need to log in
The surest way is to log all steps and look for where he stumbles.
When sending a response to the telegram server, you will receive a response with an error code (if any) and understand it.
It is possible that the bot is not receiving a request from the user.
You need all the code, you need to look at the logs, do debugging. Look for a bug in the code
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question