From 5ddae470ce5ffbf8d6bb1bedc3b6b411aff802bc Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Wed, 4 Feb 2026 12:17:14 +0100 Subject: Added dynamic calculation of processed messages --- velascobot2/parrot.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'velascobot2/parrot.py') diff --git a/velascobot2/parrot.py b/velascobot2/parrot.py index 9ca139a..641dd31 100644 --- a/velascobot2/parrot.py +++ b/velascobot2/parrot.py @@ -133,3 +133,9 @@ class Parrot: def update_chat_set_silenced(self, chat_id: str, silenced: bool): self.db.update_chat_set_silenced(chat_id, silenced) + + def get_processed_messages(self, chat_id: str) -> int: + graph_count = self.db.get_chat_graph_count(chat_id) + start_words = self.db.get_next_words(chat_id, " ") + start_word_count = sum(weight for _, weight in start_words) + return graph_count + start_word_count -- cgit v1.2.3