diff --git a/README.md b/README.md index f7a4c6d..7b2ba97 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,10 @@ _✨ 基于 NoneBot2 实现的 监测 QQ 群事件,群荣誉事件的插件✨

+ ## 介绍: + > 监测群组的以下变动事件: > > 群成员增加、减少时,自动发送通知 @@ -83,6 +85,7 @@ pip install --upgrade nonebot-plugin-eventmonitor ## 配置 + | config | type | default | example | usag | | :--------: | :------: | :------: | :-------------------: | :----------------------------------------------------------: | | SUPERUSERS | set[str] | set() | SUPERUSERS=["114514"] | 机器人超级用户,可以使用权限 [`SUPERUSER`](https://nonebot.dev/docs/2.0.0/api/permission#SUPERUSER) | diff --git a/nonebot_plugin_eventmonitor/__init__.py b/nonebot_plugin_eventmonitor/__init__.py index 0891047..7b618e6 100644 --- a/nonebot_plugin_eventmonitor/__init__.py +++ b/nonebot_plugin_eventmonitor/__init__.py @@ -7,6 +7,7 @@ from nonebot import get_driver, require from nonebot.permission import SUPERUSER from nonebot.plugin import on_notice, on_command + from nonebot.adapters.onebot.v11.permission import GROUP_OWNER, GROUP_ADMIN from .utils import utils @@ -137,6 +138,7 @@ async def _(flag: str = ArgStr("flag")) -> None: await restart.send("已取消操作...") + with contextlib.suppress(Exception): from nonebot.plugin import PluginMetadata diff --git a/nonebot_plugin_eventmonitor/utils.py b/nonebot_plugin_eventmonitor/utils.py index c9141e1..457494b 100644 --- a/nonebot_plugin_eventmonitor/utils.py +++ b/nonebot_plugin_eventmonitor/utils.py @@ -222,6 +222,7 @@ async def check_txt_to_img(check_txt_img): return False return check_txt_img + def get_function_name(self, key: str) -> str: """根据关键词获取对应功能名称""" return self.path[key][0]