mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-15 17:30:13 +08:00
22 lines
393 B
Python
22 lines
393 B
Python
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING, Any
|
|
|
|
if TYPE_CHECKING:
|
|
from .core import logger as logger
|
|
|
|
__all__ = ["logger"]
|
|
|
|
|
|
def __getattr__(name: str) -> Any:
|
|
if name == "cli":
|
|
from astrbot.cli.__main__ import cli
|
|
|
|
return cli()
|
|
|
|
if name == "logger":
|
|
from .core import logger
|
|
|
|
return logger
|
|
raise AttributeError(name)
|