From 38c452051e7ff7a9b423b8d5be19a434c4d2f6ef Mon Sep 17 00:00:00 2001 From: Guillermo Serrahima Date: Mon, 2 Feb 2026 04:15:55 +0100 Subject: More misc corrections --- velascobot2/parrot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'velascobot2/parrot.py') diff --git a/velascobot2/parrot.py b/velascobot2/parrot.py index c7ba217..9ca139a 100644 --- a/velascobot2/parrot.py +++ b/velascobot2/parrot.py @@ -103,7 +103,7 @@ class Parrot: words_count = self.db.count_words(chat_id, _normalize_key("", "")) total = graphics_count + words_count - if random.random() < graphics_count / total: + if total > 0 and random.random() < graphics_count / total: return Response.GRAPHIC else: return Response.TEXT -- cgit v1.2.3