diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-02-04 12:17:14 +0100 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-02-04 12:17:14 +0100 |
| commit | 5ddae470ce5ffbf8d6bb1bedc3b6b411aff802bc (patch) | |
| tree | ae26a0022785f4f705a474ad2596b6262d2a535c /velascobot2/parrot.py | |
| parent | 2d143ebcaf238707ddb58a4f354f30262e60e3e0 (diff) | |
| download | velascobot2-5ddae470ce5ffbf8d6bb1bedc3b6b411aff802bc.tar.xz velascobot2-5ddae470ce5ffbf8d6bb1bedc3b6b411aff802bc.zip | |
Added dynamic calculation of processed messages
Diffstat (limited to 'velascobot2/parrot.py')
| -rw-r--r-- | velascobot2/parrot.py | 6 |
1 files changed, 6 insertions, 0 deletions
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 |
