summaryrefslogtreecommitdiff
path: root/ATRI/plugins/hitokoto.py
diff options
context:
space:
mode:
Diffstat (limited to 'ATRI/plugins/hitokoto.py')
-rw-r--r--ATRI/plugins/hitokoto.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ATRI/plugins/hitokoto.py b/ATRI/plugins/hitokoto.py
index eeddf2f..83469be 100644
--- a/ATRI/plugins/hitokoto.py
+++ b/ATRI/plugins/hitokoto.py
@@ -25,8 +25,11 @@ __doc__ = """
@:at Bot
"""
-hitokoto = sv.on_message(rule=is_in_service('一言') & to_bot())
-sv.manual_reg_service('一言', __doc__)
+hitokoto = sv.on_command(
+ cmd='一言',
+ docs=__doc__,
+ rule=is_in_service('一言')
+)
@hitokoto.handle()
async def _hitokoto(bot: Bot, event: MessageEvent) -> None: