From 5a76e94c41f10a6a651d2c71762e88cd1d421d0c Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Tue, 20 Aug 2024 23:39:03 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=20=D1=81=D0=BE?= =?UTF-8?q?=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B3=D0=BB=D0=BE?= =?UTF-8?q?=D0=B1=D0=B0=D0=BB=D1=8C=D0=BD=D0=BE=D0=B3=D0=BE=20=D1=84=D0=B8?= =?UTF-8?q?=D0=BB=D1=8C=D1=82=D1=80=D0=B0=20=D0=B2=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=84=D0=B8=D0=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../karkas_blocks/standard/filters/filters.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/karkas_blocks/karkas_blocks/standard/filters/filters.py b/src/karkas_blocks/karkas_blocks/standard/filters/filters.py index f440d90..4cdd5e4 100644 --- a/src/karkas_blocks/karkas_blocks/standard/filters/filters.py +++ b/src/karkas_blocks/karkas_blocks/standard/filters/filters.py @@ -49,9 +49,7 @@ class GlobalFilter(BaseMiddleware): if config.get("filters::global::private_allowed"): return await handler(event, data) - await event.answer("НЕЛЬЗЯ!") - - return + return await event.answer(config.get("filters::global::forbidden_message")) def module_init(): @@ -59,7 +57,11 @@ def module_init(): "filters::approved_chat_id", "int", multiple=True, shared=True, default_value=[] ) config.register("filters::default_chat_tag", "string", shared=True) - + config.register( + "filters::global::forbidden_message", + "string", + default_value="Вы не имеете доступа!", + ) config.register("filters::global::enabled", "boolean", default_value=False) config.register("filters::global::private_allowed", "boolean", default_value=False)