Please answer these questions before submitting your issue. Thanks!
What version of pyTelegramBotAPI are you using? v4.9.0
What OS are you using? Windows 10
What version of python are you using? v3.10.6
Issue:
The handler didnt handling correctly, when im texting 'adhewfg' or some random word, the bot return handler with specific text. My code looks like this:
@bot.message_handler(func=lambda message: "goBackProvider") # when i sent random word, the bot return message from this handler
def nextGuess(message):
markup = types.ReplyKeyboardMarkup()
btn1 = types.KeyboardButton(buyMLBB)
btn2 = types.KeyboardButton(buyFF)
btn3 = types.KeyboardButton(buyAOV)
btn4 = types.KeyboardButton(buyPUBG)
markup.add(btn1, btn2, btn3, btn4)
bot.send_message(message.chat.id, "Silahkan memilih provider yang tersedia!", reply_markup=markup)
@bot.message_handler(func=lambda message: True) # my expectation is the bot return message from this handler
def what(message):
bot.reply_to(message, 'Maaf, aku tidak mengerti maksud kamu, gunakan tombol/perintah untuk berinteraksi denganku')
Please answer these questions before submitting your issue. Thanks!
What version of pyTelegramBotAPI are you using? v4.9.0
What OS are you using? Windows 10
What version of python are you using? v3.10.6
Issue: The handler didnt handling correctly, when im texting 'adhewfg' or some random word, the bot return handler with specific text. My code looks like this: