This commit is contained in:
Untone 2024-09-26 18:21:39 +03:00
parent c078cf5c64
commit 3b593fe8c7

View File

@ -46,7 +46,7 @@ async def messages_routing(msg, state):
text = f"Доброе утро! Средняя токсичность твоих сообщений: {toxic_score}%"
else:
latest_toxic_message_id = await redis.get(f"toxic:{cid}")
scoring_msg_id = reply_msg.get("message_id") or latest_toxic_message_id
scoring_msg_id = reply_msg.get("message_id") or int(latest_toxic_message_id)
toxic_score = await redis.get(f"toxic:{cid}:{uid}:{scoring_msg_id}")
x = int(toxic_score) if toxic_score else 0
text = f"{x}% токсичности"