N
N
nickname32432020-05-10 18:02:47
Python
nickname3243, 2020-05-10 18:02:47

Telebot error on startup. What to do?

I wanted to create a bot in telegrams on PYTHON for the test. Here is the code:

import telebot
bot = telebot.telebot('мой токен')
@bot.message_handler(commands=['start'])
def start_message(message):
   bot.send_message(message.chat.id, 'тестирую')
bot.polling()

I run it and this is the error:
Traceback (most recent call last):
  File "C:\Users\user\bot.py", line 2, in <module>
    bot = telebot.telebot('мой токен')
AttributeError: module 'telebot' has no attribute 'telebot'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Tikhonov, 2020-05-10
@nickname3243

the Telebot class in the library is capitalized.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question