Skip to content

Problem with message_handler #1740

@Vamashi

Description

@Vamashi

Please answer these questions before submitting your issue. Thanks!

  1. What version of pyTelegramBotAPI are you using? 4.7.0 (latest)

  2. What OS are you using? Windows

  3. What version of python are you using? 22.2.2

I tried alot of codes, no one working, i tried with code from documentation, it also not working :(
I think problem with @message_handler, because bot starting polling, can send messages, but if i send a message to him, he not response (no print, no messages)

`import telebot

bot = telebot.TeleBot("token")

@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
bot.reply_to(message, "Howdy, how are you doing?")

@bot.message_handler(func=lambda message: True)
def echo_all(message):
bot.reply_to(message, message.text)

bot.infinity_polling()`

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions