From 6c1adf644ce0a66c6e9a5f823529e68c35a539b6 Mon Sep 17 00:00:00 2001 From: Untone Date: Thu, 26 Sep 2024 20:43:56 +0300 Subject: [PATCH] toxic-debug7 --- handlers/messages_routing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 05a2f7e..d3ff4ba 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -42,10 +42,10 @@ async def messages_routing(msg, state): msg_toxic_key = f"toxic:{cid}:{uid}:{scoring_msg_id}" logger.debug('msg_toxic_key: ', msg_toxic_key) one_score = await redis.get(msg_toxic_key) - one_score = int(one_score[0]) + msg_score = int(one_score[0]) logger.debug('one_score: ', one_score) emoji = '😳' if toxic_score > 90 else '😟' if toxic_score > 80 else '😏' if toxic_score > 60 else '🙂' if toxic_score > 20 else '😇' - text = f"{one_score}% токсичности\nСредняя токсичность сообщений: {toxic_score}% {emoji}" + text = f"{msg_score}% токсичности\nСредняя токсичность сообщений: {toxic_score}% {emoji}" if text: await telegram_api( "sendMessage",