P
P
PosikGG2021-08-14 11:08:13
Python
PosikGG, 2021-08-14 11:08:13

Why does python throw an error?

import telebot

bot = telebot.TeleBot("###")

@bot.message_handler(content_types = ["text", "document", "audio"])

if message.text == "Привет":
    bot.send_message(message.from_user.id, "Привет,!")
elif message.text == "Как дела":
    bot.send_message(message.from_user.id, "Норм!")
elif message.text == "Тупой":
    bot.send_message(message.from_user.id, "ЩА я тебя насажу!")
else:
    bot.send_message(message.from_user.id, "Я тебя не понимаю!")

bot.polling(none_stop = True, interval = 0)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2021-08-14
@PosikGG

Decorators are hung up on function. Where is the function?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question