aboutsummaryrefslogtreecommitdiff
path: root/velascobot2/parrot.py
diff options
context:
space:
mode:
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