Выдает ошибку в коде для телеграмм бота TypeError: Updater.__init__() got an unexpected keyword argument 'use_context'
Вот весь код:
from telegram.ext import Updater, CommandHandler, MessageHandler, filters
from nltk.sentiment.vader import SentimentIntensityAnalyzer
sid = SentimentIntensityAnalyzer()
def analyze_sentiment(update, context):
text = update.message.text
scores = sid.polarity_scores(text)
compound_score = scores['compound']
if compound_score < 0:
context.bot.send_message(chat_id=update.effective_chat.id, text="Ваше сообщение было определено как негативное. Вы заблокированы.")
context.bot.kick_chat_member(chat_id=update.effective_chat.id, user_id=update.message.from_user.id)
updater = Updater("OKEN", use_context=True)
dispatcher = updater.dispatcher
dispatcher.add_handler(MessageHandler(filters.text & ~filters.command, analyze_sentiment))
updater.start_polling()
updater.idle()