Answer the question
In order to leave comments, you need to log in
Telebot doesn't allow "commands" commands?
It gives an error: TeleBot.message_handler() got an unexpected keyword argument 'commands'
Searching the Internet did not find an answer, please help
Here is the code
import telebot
from telebot import types
bot = telebot.TeleBot("5031767148:AAFW3rMKl1cFOS-EALaPxVNhPVD1PsJenQQ")
@bot. message_handler(commands=['start'])
def start_message(message):
bot.send_message(message.chat.id, "Hello ✌️")
bot.infinity_poling()
Answer the question
In order to leave comments, you need to log in
@bot.message_handler(commands = ['start'])
def start(message):
bot.send_message(message.chat.id, "Привет ✌️ ")
pip uninstall telebot
pip install pytelegrambotapi
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question