Skip to content

Commit

Permalink
♻️ 添加uninfo require
Browse files Browse the repository at this point in the history
  • Loading branch information
hanasa2023 committed Feb 5, 2025
1 parent 5395d9b commit b74a518
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nonebot_plugin_ba_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
)
from .webui import app as app

__version__ = "0.5.9.post1"
__version__ = "0.5.9.post2"
__plugin_meta__ = PluginMetadata(
name="ba-tools",
description="BlueArchive的工具箱",
Expand Down
10 changes: 6 additions & 4 deletions nonebot_plugin_ba_tools/llm/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
from nonebot.matcher import Matcher
from nonebot.rule import to_me

from ..config import LLM_DIR, ConfigManager, config
from ..utils.user_info import is_superuser
from .client import Chat

require("nonebot_plugin_alconna")
from nonebot_plugin_alconna import (
Alconna,
Expand All @@ -17,11 +21,9 @@
UniMessage,
on_alconna,
)
from nonebot_plugin_uninfo import SceneType, Uninfo

from ..config import LLM_DIR, ConfigManager, config
from ..utils.user_info import is_superuser
from .client import Chat
require("nonebot_plugin_uninfo")
from nonebot_plugin_uninfo import SceneType, Uninfo


def is_enable() -> bool:
Expand Down
4 changes: 3 additions & 1 deletion nonebot_plugin_ba_tools/send_battle_info/command.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from typing import Any

from nonebot import require
from nonebot_plugin_uninfo import SceneType, Uninfo

from ..utils.user_info import is_superuser
from .utils.common import save_battle_config
Expand All @@ -16,6 +15,9 @@
on_alconna,
)

require("nonebot_plugin_uninfo")
from nonebot_plugin_uninfo import SceneType, Uninfo

battle_info: Alconna[Any] = Alconna("ba总力战订阅", Args["status", str])
battle_info_switch: type[AlconnaMatcher] = on_alconna(battle_info, use_cmd_start=True)

Expand Down
4 changes: 3 additions & 1 deletion nonebot_plugin_ba_tools/send_birthday_info/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from typing import Any

from nonebot import get_driver, logger, require
from nonebot_plugin_uninfo import SceneType, Uninfo

from ..config import SETTING_DIR, ConfigManager
from ..utils.constants import BIRTHDAY_INFO_GROUP_LIST_FILE
Expand All @@ -18,6 +17,9 @@
on_alconna,
)

require("nonebot_plugin_uninfo")
from nonebot_plugin_uninfo import SceneType, Uninfo

GROUP_LIST: list[int] = []


Expand Down
2 changes: 1 addition & 1 deletion nonebot_plugin_ba_tools/utils/get_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def get_system_info() -> dict[str, str]:
def get_nonebot_info() -> dict[str, Any]:
"""获取NoneBot信息"""
plugin_count = len(nonebot.get_loaded_plugins())
nonebot_version = f"nonebot {nonebot.__version__} x ba-tools 0.5.9.post1"
nonebot_version = f"nonebot {nonebot.__version__} x ba-tools 0.5.9.post2"
nickname = nonebot.get_driver().config.nickname

return {
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "nonebot-plugin-ba-tools"
version = "0.5.9.post1"
version = "0.5.9.post2"
description = "一个BlueArchive工具箱"
authors = [
"hanasaki <hanasakayui2022@gmail.com>",
Expand Down

0 comments on commit b74a518

Please sign in to comment.