intfix4
This commit is contained in:
parent
7a967cb955
commit
c85fa62e2f
|
@ -43,7 +43,7 @@ async def messages_routing(msg, state):
|
|||
scr = int(await redis.get(key))
|
||||
scores.append(scr)
|
||||
toxic_score = math.floor(sum(scores)/len(scores)) if scores else 0
|
||||
emoji = '🙏' if toxic_score < 3 else
|
||||
emoji = '😳' if toxic_score > 90 else '😟' if toxic_score > 80 else '😏' if toxic_score > 60 else '🙂' if toxic_score > 20 else '😇'
|
||||
text = f"Доброе утро! Средняя токсичность твоих сообщений: {toxic_score}% {emoji}"
|
||||
else:
|
||||
latest_toxic_message_id = await redis.get(f"toxic:{cid}")
|
||||
|
|
Loading…
Reference in New Issue
Block a user