diff --git a/handlers/messages_routing.py b/handlers/messages_routing.py index 46df5e3..4b1bf3a 100644 --- a/handlers/messages_routing.py +++ b/handlers/messages_routing.py @@ -43,7 +43,8 @@ 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 - text = f"Доброе утро! Средняя токсичность твоих сообщений: {toxic_score}%" + emoji = '🙏' if toxic_score < 3 else + text = f"Доброе утро! Средняя токсичность твоих сообщений: {toxic_score}% {emoji}" else: latest_toxic_message_id = await redis.get(f"toxic:{cid}") scoring_msg_id = reply_msg.get("message_id") or int(latest_toxic_message_id) diff --git a/store.py b/store.py index d0d0a2f..3bdcd65 100644 --- a/store.py +++ b/store.py @@ -16,6 +16,6 @@ async def get_all_removed(uid): # Fetch the value for each key value = await redis.get(key) if value: - texts.append(value) + texts.append(int(value)) return texts