This commit is contained in:
Untone 2024-09-26 18:14:44 +03:00
parent 2909e3b905
commit c078cf5c64

View File

@ -48,8 +48,8 @@ async def messages_routing(msg, state):
latest_toxic_message_id = await redis.get(f"toxic:{cid}") 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 latest_toxic_message_id
toxic_score = await redis.get(f"toxic:{cid}:{uid}:{scoring_msg_id}") toxic_score = await redis.get(f"toxic:{cid}:{uid}:{scoring_msg_id}")
if toxic_score: x = int(toxic_score) if toxic_score else 0
text = f"{int(toxic_score)}% токсичности" text = f"{x}% токсичности"
await telegram_api( await telegram_api(
"deleteMessage", "deleteMessage",
chat_id=cid, chat_id=cid,