feat: 将事件名称统一为 名词+动词 形式

This commit is contained in:
Rock Chin
2023-01-14 23:35:03 +08:00
parent fa967c3c89
commit 52d6721ae2
4 changed files with 15 additions and 15 deletions
+4 -4
View File
@@ -77,9 +77,9 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
'text_message': text_message,
'is_admin': sender_id is config.admin_qq,
}
event = plugin_host.emit(plugin_models.PersonCommand
event = plugin_host.emit(plugin_models.PersonCommandSent
if launcher_type == 'person'
else plugin_models.GroupCommand, **args)
else plugin_models.GroupCommandSent, **args)
if not event.is_prevented_default():
reply = pkg.qqbot.command.process_command(session_name, text_message,
@@ -93,9 +93,9 @@ def process_message(launcher_type: str, launcher_id: int, text_message: str, mes
"sender_id": sender_id,
"text_message": text_message,
}
event = plugin_host.emit(plugin_models.PersonNormalMessage
event = plugin_host.emit(plugin_models.PersonNormalMessageReceived
if launcher_type == 'person'
else plugin_models.GroupNormalMessage, **args)
else plugin_models.GroupNormalMessageReceived, **args)
if not event.is_prevented_default():
reply = pkg.qqbot.message.process_normal_message(text_message,