diff --git a/nonebot_plugin_mute/__init__.py b/nonebot_plugin_mute/__init__.py index a5b3a44..fd9c430 100644 --- a/nonebot_plugin_mute/__init__.py +++ b/nonebot_plugin_mute/__init__.py @@ -1,7 +1,7 @@ from nonebot.plugin import PluginMetadata from . import __main__ -from .config import config +from .config import Config # 插件信息 __plugin_meta__ = PluginMetadata( @@ -9,7 +9,7 @@ description="唔唔?你想被禁言嘛~?", usage="禁我", type="application", - config=config, + config=Config, homepage="https://github.com/shengwang52005/nonebot_plugin_mute", supported_adapters={"~onebot.v11"}, extra={}, diff --git a/nonebot_plugin_mute/__main__.py b/nonebot_plugin_mute/__main__.py index 2c2bc82..c06cfad 100644 --- a/nonebot_plugin_mute/__main__.py +++ b/nonebot_plugin_mute/__main__.py @@ -6,9 +6,9 @@ import random from nonebot.plugin import get_plugin_config -from .config import config +from .config import Config -plugin_config = get_plugin_config(config) +plugin_config = get_plugin_config(Config) mute_times = plugin_config.MUTE_TIMES logger.info(f"禁言时间配置:{mute_times}") diff --git a/nonebot_plugin_mute/config.py b/nonebot_plugin_mute/config.py index 8f3f63e..379e777 100644 --- a/nonebot_plugin_mute/config.py +++ b/nonebot_plugin_mute/config.py @@ -1,5 +1,5 @@ from pydantic import BaseModel, Field -class config(BaseModel): +class Config(BaseModel): MUTE_TIMES: list[int] = Field(default=[1, 5, 10, 30]) diff --git a/pyproject.toml b/pyproject.toml index f5b2883..bf24797 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "nonebot_plugin_mute" -version = "0.2.2" +version = "0.2.3" description = "唔唔?你想被禁言嘛~?" authors = ["Miaowing "] license = "MIT"