Answer the question
In order to leave comments, you need to log in
What is wrong with the Telegram bot code?
import telebot
TOKEN = 'token'
bot=telebot.Telebot = TOKEN
@bot.message_handler(commands=['start'])
def start(message):
bot.send_sticker(message.chat.id, 'CAACAgIAAxkBAAECnZVg-UPv8J7kPhnbCpqULmLItyskwwACSAEAAntOKhBDvsTRe_qU_yAE')
[email protected] ~ % /usr/local/bin/python3 /Users/kirzhq/Documents/Progrm/bot.py?
Traceback (most recent call last):
File "/Users/kirzhq/Documents/Progrm/bot. py", line 6, in
@bot.message_handler(commands=['start'])
AttributeError: 'str' object has no attribute 'message_handler'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question