This commit is contained in:
student_2333 2024-10-30 01:56:37 +08:00
parent 4f920ac30e
commit cd2664a668
3 changed files with 10 additions and 9 deletions

View File

@ -176,6 +176,10 @@ plugins = [
## 📝 更新日志
### 2.1.3
- 修复忽略群管与超级用户无效的 Bug
### 2.1.2
- 重构部分代码,修复潜在 Bug

View File

@ -9,7 +9,7 @@ require("nonebot_plugin_uninfo")
from . import handler as handler
from .config import Config
__version__ = "2.1.2"
__version__ = "2.1.3"
__plugin_meta__ = PluginMetadata(
name="自动撤回奶龙",
description="一个基于图像分类模型的简单插件~",

View File

@ -67,15 +67,12 @@ async def nailong_rule(
return (
# check if it's a group chat
bool(session.member) # this prop only exists in group chats
# bypass
# bypass superuser
and ((not config.nailong_bypass_superuser) or (not await SUPERUSER(bot, event)))
# bypass group admin
and (
# bypass superuser
((not config.nailong_bypass_superuser) or (not await SUPERUSER(bot, event)))
# bypass group admin
or (
(not config.nailong_bypass_admin)
or ((not session.member.role) or session.member.role.level <= 1)
)
(not config.nailong_bypass_admin)
or ((not session.member.role) or session.member.role.level <= 1)
)
# msg has image
and ((Image in msg) or (MarketFace in msg))