diff options
Diffstat (limited to 'utils')
| -rw-r--r-- | utils/filters.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/filters.py b/utils/filters.py index 54963da..9782a27 100644 --- a/utils/filters.py +++ b/utils/filters.py | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | from __future__ import annotations | 1 | from __future__ import annotations |
| 2 | 2 | ||
| 3 | from random import random | 3 | from random import randint |
| 4 | 4 | ||
| 5 | from aiogram import filters as f | 5 | from aiogram import filters as f |
| 6 | from aiogram import types as t | 6 | from aiogram import types as t |
| @@ -15,7 +15,7 @@ class message: | |||
| 15 | 15 | ||
| 16 | @staticmethod | 16 | @staticmethod |
| 17 | def chance(msg: t.Message): | 17 | def chance(msg: t.Message): |
| 18 | return random() <= (ins.gen_chance / 100) | 18 | return ins.gen_chance.get(msg.chat.id, 10) <= randint(1, 100) |
| 19 | 19 | ||
| 20 | @staticmethod | 20 | @staticmethod |
| 21 | def has_text(msg: t.Message): | 21 | def has_text(msg: t.Message): |
