intfix
This commit is contained in:
parent
2909e3b905
commit
c078cf5c64
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user