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)