import telebot
bot = telebot.TeleBot('1788376320:xCxcEpIFmhT9O7w')
@bot.message_handler(commands=['start', 'help'])
def send_welcome(message):
bot.send_message(message.chat.id, "Howdy, how are you doing?")
bot.polling()
Результат:
Traceback (most recent call last):
File "C:/Users/Константин/untitled1/telegram bot.py", line 7, in <module>
def send_welcome(message):
TypeError: 'NoneType' object is not callable
если задать вот такой параметр:
bot = telebot.TeleBot("TOKEN", parse_mode=None)
то выдает такую ошибку:
File "C:/Users/Константин/untitled1/telegram bot.py", line 3, in <module>
bot = telebot.TeleBot('1788376320:9xCxcEpIFmhT9O7w', parse_mode=None)
TypeError: __init__() got an unexpected keyword argument 'parse_mode'
код изначально брал из документации https://github.com/eternnoir/pyTelegramBotAPI