Skip to content

Commit

Permalink
✨ base config cmd_count
Browse files Browse the repository at this point in the history
  • Loading branch information
RF-Tar-Railt committed Jan 24, 2025
1 parent e8c8943 commit 8e2588b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions arclet/entari/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class BasicConfig(TypedDict, total=False):
ignore_self_message: bool
log_level: int | str
prefix: list[str]
cmd_count: int


@dataclass
Expand Down
2 changes: 2 additions & 0 deletions arclet/entari/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from contextlib import suppress
import os

from arclet.alconna import config as alconna_config
from arclet.letoderea import Contexts, Param, Provider, ProviderFactory, es, global_providers
from creart import it
from launart import Launart, Service
Expand Down Expand Up @@ -130,6 +131,7 @@ def __init__(
super().__init__(*configs, default_api_cls=EntariProtocol)
if not hasattr(EntariConfig, "instance"):
EntariConfig.load()
alconna_config.command_max_count = EntariConfig.instance.basic.get("cmd_count", 4096)
log.set_level(log_level)
log.core.opt(colors=True).debug(f"Log level set to <y><c>{log_level}</c></y>")
requires(*EntariConfig.instance.prelude_plugin)
Expand Down

0 comments on commit 8e2588b

Please sign in to comment.