toxic-debug3

This commit is contained in:
2024-09-26 20:28:16 +03:00
parent 21a366abe1
commit a51e936f67
3 changed files with 22 additions and 10 deletions

View File

@@ -26,6 +26,11 @@ async def handle_private(msg, state):
elif text.startswith('/message'):
await edit_announce(msg)
return
elif text.startswith('/toxic'):
toxic_score = get_average_toxic(msg)
text = f"Средняя токсичность сообщений: {toxic_score}%"
await telegram_api("sendMessage", chat_id=uid, reply_to_message_id=msg.get("message_id"), text=text)
return
elif text == '/removed':
removed_messages = await get_all_removed(uid)
if removed_messages: