Ошибка : Traceback (most recent call last):

я написал код для бота, но при запуске выдает ошибку

import telebot

import time

token = 'тут токен'

bot  = telebot.TeleBot(token)

@bot.message_handler(commands=['start'])

def start_message(message):

    bot.send_message(message.chat.id, 'команды:/1,/2,/3,/4')

@bot.message_handler(commands=['1'])

def 1_message(message):

    while True:
    
        bot.send_message(message.chat.id, '1!!!')
    
        time.sleep(0.5)
    
@bot.message_handler(commands=['shd'])

def 2_message(message):

        while True:
    
        bot.send_message(message.chat.id, '2')
   
        time.sleep(0.5)

@bot.message_handler(commands=['3'])

def 3_message(message):

    while True:
    
        bot.send_message(message.chat.id, '3')
    
        time.sleep(0.5)
            
@bot.message_handler(commands=['4'])

def 4_message(message):

bot.send_message(message.chat.id, '4')

bot.infinity_polling()

Ответы (0 шт):