Archived
1
0
Fork 0

module list -> modules

This commit is contained in:
yzhh 2022-05-26 00:15:08 +08:00
parent 39ce9bf494
commit 5419986563
2 changed files with 11 additions and 5 deletions

View file

@ -37,7 +37,7 @@ class Bind:
required_superuser=required_superuser,
available_for=available_for,
exclude_from=exclude_from))
return function
return decorator
class Regex:
@ -51,7 +51,7 @@ class Bind:
mode=mode,
flags=flags,
show_typing=show_typing))
return function
return decorator
class Schedule:
@ -61,7 +61,7 @@ class Bind:
def handle(self):
def decorator(function):
ModulesManager.bind_to_module(self.bind_prefix, ScheduleMeta(function=function))
return function
return decorator

View file

@ -29,15 +29,21 @@ module = on_command('module',
@module.handle(['enable (<module>...|all) {开启一个/多个或所有模块}',
'disable (<module>...|all) {关闭一个/多个或所有模块}'], exclude_from=['QQ|Guild'])
'disable (<module>...|all) {关闭一个/多个或所有模块}',
'list {查看所有可用模块}'], exclude_from=['QQ|Guild'])
async def _(msg: MessageSession):
if msg.parsed_msg['list']:
await modules_help(msg)
await config_modules(msg)
@module.handle(['enable (<module>...|all) [-g] {开启一个/多个或所有模块}',
'disable (<module>...|all) [-g] {关闭一个/多个或所有模块\n [-g] - 为文字频道内全局操作}'],
'disable (<module>...|all) [-g] {关闭一个/多个或所有模块\n [-g] - 为文字频道内全局操作}',
'list {查看所有可用模块}'],
available_for=['QQ|Guild'])
async def _(msg: MessageSession):
if msg.parsed_msg['list']:
await modules_help(msg)
await config_modules(msg)