Update __init__.py
This commit is contained in:
parent
eb43e90563
commit
0d0217385c
1 changed files with 4 additions and 4 deletions
|
@ -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:
|
||||
|
|
Reference in a new issue