Merge branch 'reload' of https://github.com/Light-Beacon/akari-bot into pr/422
This commit is contained in:
commit
6962caaf35
2 changed files with 3 additions and 2 deletions
|
@ -84,7 +84,7 @@ class ModulesManager:
|
|||
@staticmethod
|
||||
def return_py_module(module):
|
||||
if module in ModulesManager.modulesOrigin:
|
||||
return re.match(r'^modules(\.[a-zA-Z0-9]*)?', ModulesManager.modulesOrigin[module]).group()
|
||||
return re.match(r'^modules(\.[a-zA-Z0-9_]*)?', ModulesManager.modulesOrigin[module]).group()
|
||||
else:
|
||||
return None
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ async def _(msg: MessageSession):
|
|||
'enable all [-g] {开启所有模块}',
|
||||
'disable [-g] <module>... {关闭一个/多个模块}',
|
||||
'disable all [-g] {关闭所有模块。}',
|
||||
'reload <module> [-f] {重载一个/多个模块。}',
|
||||
'reload <module> [-f] {重载一个模块。}',
|
||||
'list {查看所有可用模块}'], options_desc={'-g': '对频道进行全局操作'},
|
||||
available_for=['QQ|Guild'])
|
||||
async def _(msg: MessageSession):
|
||||
|
@ -166,6 +166,7 @@ async def config_modules(msg: MessageSession):
|
|||
'\n'.join(extra_reload_modules) +
|
||||
'\n是否继续?' )
|
||||
if not confirm:
|
||||
await msg.finish()
|
||||
return
|
||||
msglist.append(module_reload(module_,extra_reload_modules))
|
||||
else:
|
||||
|
|
Reference in a new issue