Ошибка
Traceback (most recent call last):
File "C:\Users\PC\PycharmProjects\pythonProject1\bbbb.py", line 3, in <module>
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext
ImportError: cannot import name 'Filters' from 'telegram.ext' (C:\Users\PC\PycharmProjects\pythonProject1\.venv\Lib\site-packages\telegram\ext\__init__.py)
Вот код
import telebot
TOKEN = 'token'
bot = telebot.TeleBot(TOKEN)
@bot.message_handlers(content_types=['text'])
def talk(message):
bot.send_message(message.chat.id, message.text)
bot.polling(none_stop=True)
Traceback (most recent call last):
File "C:\Users\PC\PycharmProjects\pythonProject1\bbbb.py", line 3, in <module>
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, CallbackContext
ImportError: cannot import name 'Filters' from 'telegram.ext' (C:\Users\PC\PycharmProjects\pythonProject1\.venv\Lib\site-packages\telegram\ext\__init__.py)
Вот код
import telebot
TOKEN = 'token'
bot = telebot.TeleBot(TOKEN)
@bot.message_handlers(content_types=['text'])
def talk(message):
bot.send_message(message.chat.id, message.text)
bot.polling(none_stop=True)