toxic-average-fix

This commit is contained in:
2024-09-26 22:42:21 +03:00
parent e6db7f1a1b
commit 1945baf1d0
2 changed files with 16 additions and 8 deletions

View File

@@ -27,7 +27,7 @@ async def handle_private(msg, state):
await edit_announce(msg)
return
elif text.startswith('/toxic'):
toxic_score = get_average_toxic(msg)
toxic_score = await 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