E
E
Egor Rykov2020-10-20 23:00:31
Python
Egor Rykov, 2020-10-20 23:00:31

How to solve the problem with the simplest bot in Python?

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.polling()


I wrote a bot as indicated in the instructions in the module description at: https://pypi.org/project/pyTelegramBotAPI/#getting... , but it does not work.
Please help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Rykov, 2020-10-23
@ANANASIO

I solved the problem myself, there was an error in the token. Through botFather, I did a revoke, inserted a new token, and everything started

V
Vadim Simakin, 2020-10-21
@Vadessa

Have you installed telebot as written on PyPI?
Try some example from their GitHub or official site.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question