aboutsummaryrefslogtreecommitdiff
path: root/velascobot2/parrot.py
diff options
context:
space:
mode:
authorGuillermo Serrahima <dev@vylion.com>2026-02-02 04:15:55 +0100
committerGuillermo Serrahima <dev@vylion.com>2026-02-02 04:15:55 +0100
commit38c452051e7ff7a9b423b8d5be19a434c4d2f6ef (patch)
treec79867863a4fd0938db7a0618c11f02828087f1f /velascobot2/parrot.py
parentfb915558d45d175b82331615390d18f29302f9a9 (diff)
downloadvelascobot2-38c452051e7ff7a9b423b8d5be19a434c4d2f6ef.tar.xz
velascobot2-38c452051e7ff7a9b423b8d5be19a434c4d2f6ef.zip
More misc corrections
Diffstat (limited to 'velascobot2/parrot.py')
-rw-r--r--velascobot2/parrot.py2
1 files changed, 1 insertions, 1 deletions
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