import telebot
bot = telebot.TeleBot('твой токен')
@bot.message_handler(commands=['start'])
def handle_start(message):
bot.send_message(message.chat.id, 'Привет')
@bot.message_handler(commands=['help'])
def handle_help(message):
bot.send_message(message.chat.id, 'Вот что я умею:\n'
'/start - начать работу с ботом\n'
'/help - получить помощь\n'
'/info - получить информацию')
@bot.message_handler(commands=['info'])
def handle_info(message):
bot.send_message(message.chat.id, 'Telebot')
@bot.message_handler(content_types=['text'])
def handle_text(message):
bot.send_message(message.chat.id, 'Пришло ваше сообещение: ' + message.text)
@bot.error_handler
def handle_error(error):
bot.send_message(admin_id, 'Ошибка: ' + str(error))
bot.infinity_polling()