mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 14:22:55 +08:00
add config
This commit is contained in:
parent
7ab185f7d7
commit
a7d61b1f2b
@ -249,6 +249,7 @@ __Docker 最新版本由 [Sakuracio](https://github.com/Sakuracio) 提供__
|
||||
* 修复原神玩家查询层岩巨渊地下矿区没开时报错
|
||||
* 修复 ```休息吧``` 无法阻断戳一戳
|
||||
* 当图库无图片时,戳一戳将略过发送图片
|
||||
* 新增搜图提供配置项ALLOW_GROUP_R18:允许在群聊中使用r18参数
|
||||
|
||||
### 2022/5/26
|
||||
|
||||
|
||||
@ -71,6 +71,11 @@ __plugin_configs__ = {
|
||||
"value": 20,
|
||||
"help": "作品最大页数限制,超过的作品会被略过",
|
||||
"default_value": 20
|
||||
},
|
||||
"ALLOW_GROUP_R18": {
|
||||
"value": False,
|
||||
"help": "允许群聊中使用 r18 参数",
|
||||
"default_value": False
|
||||
}
|
||||
}
|
||||
Config.add_plugin_config(
|
||||
@ -154,7 +159,7 @@ async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
|
||||
async def _(bot: Bot, event: MessageEvent, arg: Message = CommandArg()):
|
||||
msg = arg.extract_plain_text().strip()
|
||||
if isinstance(event, GroupMessageEvent):
|
||||
if "r18" in msg.lower():
|
||||
if "r18" in msg.lower() and not Config.get_config("pixiv_rank_search", "ALLOW_GROUP_R18"):
|
||||
await pixiv_keyword.finish("(脸红#) 你不会害羞的 八嘎!", at_sender=True)
|
||||
r18 = 0 if "r18" in msg else 1
|
||||
msg = msg.replace("r18", "").strip().split()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user