fixing a lot of custom emojis

This commit is contained in:
Vladless
2026-02-11 19:54:17 +03:00
parent 472a099a8f
commit 2a68f8e36c
5 changed files with 56 additions and 507 deletions
+3
View File
@@ -22,6 +22,7 @@ def load_modules_from_folder(folder: str = "modules") -> list[Router]:
base_path = Path(folder)
for _finder, name, _ispkg in pkgutil.iter_modules([str(base_path)]):
name = (name or "").strip()
if not _is_safe_module_name(name):
logger.warning(f"[Modules] Пропуск недопустимого имени модуля: {name!r}")
continue
@@ -50,6 +51,7 @@ def load_module_webhooks(folder: str = "modules") -> list[dict]:
base_path = Path(folder)
for _finder, name, _ispkg in pkgutil.iter_modules([str(base_path)]):
name = (name or "").strip()
if not _is_safe_module_name(name):
continue
if not manager.should_autostart(name):
@@ -74,6 +76,7 @@ def load_module_fast_flow_handlers(folder: str = "modules") -> dict:
base_path = Path(folder)
for _finder, name, _ispkg in pkgutil.iter_modules([str(base_path)]):
name = (name or "").strip()
if not _is_safe_module_name(name):
continue
if not manager.should_autostart(name):