toxic-score-reply-fix
This commit is contained in:
@@ -41,6 +41,11 @@ async def messages_routing(msg, state):
|
|||||||
reply_to_message_id=rmsg,
|
reply_to_message_id=rmsg,
|
||||||
text=f"{latest_toxic.get(f"{cid}:{rmsg}", 0)}% токсичности"
|
text=f"{latest_toxic.get(f"{cid}:{rmsg}", 0)}% токсичности"
|
||||||
)
|
)
|
||||||
|
await telegram_api(
|
||||||
|
"deleteMessage",
|
||||||
|
chat_id=cid,
|
||||||
|
message_id=mid
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
toxic_score = detector(text)
|
toxic_score = detector(text)
|
||||||
toxic_perc = math.floor(toxic_score*100)
|
toxic_perc = math.floor(toxic_score*100)
|
||||||
|
Reference in New Issue
Block a user