Archived
1
0
Fork 0

Update __init__.py

This commit is contained in:
yzhh 2022-08-17 02:52:40 +08:00
parent eb43e90563
commit 0d0217385c

View file

@ -206,9 +206,9 @@ async def _(msg: MessageSession):
await msg.finish(f'成功重置请求时所使用的前缀。')
@wiki.handle('fandom (enable|disable) {启用/禁用Fandom全局Interwiki查询}', required_admin=True)
@wiki.handle('fandom enable {禁用Fandom全局Interwiki查询}', 'fandom disable {禁用Fandom全局Interwiki查询}', required_admin=True)
async def _(msg: MessageSession):
if msg.parsed_msg['enable']:
if msg.parsed_msg.get('enable', False):
BotDBUtil.Options(msg).edit('wiki_fandom_addon', True)
await msg.finish('已启用Fandom全局Interwiki查询。')
else:
@ -228,7 +228,7 @@ async def _(msg: MessageSession):
check = await WikiLib(api).check_wiki_available()
if check.available:
api = check.value.api
if req['trust']:
if req.get('trust', False):
res = Audit(api).add_to_AllowList(op)
list_name = ''
else:
@ -251,7 +251,7 @@ async def _(msg: MessageSession):
check = await WikiLib(api).check_wiki_available()
if check:
api = check.value.api
if req['distrust']:
if req.get('distrust', False):
res = Audit(api).remove_from_AllowList()
list_name = ''
else: