no-process-score2
This commit is contained in:
@@ -33,14 +33,14 @@ async def messages_routing(msg, state):
|
|||||||
|
|
||||||
elif bool(text):
|
elif bool(text):
|
||||||
mid = msg.get("message_id")
|
mid = msg.get("message_id")
|
||||||
if text.startswith('/score'):
|
if text == '/score@welcomecenter_bot':
|
||||||
await telegram_api(
|
await telegram_api(
|
||||||
"sendMessage",
|
"sendMessage",
|
||||||
chat_id=cid,
|
chat_id=cid,
|
||||||
reply_to=mid,
|
reply_to=mid,
|
||||||
text=f"{latest_toxic.get(cid, 0)}%"
|
text=f"{latest_toxic.get(cid, 0)}%"
|
||||||
)
|
)
|
||||||
return
|
else:
|
||||||
toxic_score = detector(text)
|
toxic_score = detector(text)
|
||||||
toxic_perc = math.floor(toxic_score*100)
|
toxic_perc = math.floor(toxic_score*100)
|
||||||
latest_toxic[cid] = toxic_perc
|
latest_toxic[cid] = toxic_perc
|
||||||
|
Reference in New Issue
Block a user