添加聊天类型限制功能,支持根据聊天类型过滤命令和动作,新增私聊和群聊专用命令及动作,优化相关日志记录。
This commit is contained in:
committed by
Windpicker-owo
parent
802a1deb1c
commit
38fed9b4cc
@@ -11,6 +11,7 @@ from src.plugin_system import (
|
||||
from src.person_info.person_info import get_person_info_manager
|
||||
from src.common.logger import get_logger
|
||||
from src.plugin_system import database_api
|
||||
from src.plugin_system.base.component_types import ChatType
|
||||
logger = get_logger(__name__)
|
||||
|
||||
class AtAction(BaseAction):
|
||||
@@ -21,6 +22,7 @@ class AtAction(BaseAction):
|
||||
action_description = "发送艾特消息"
|
||||
activation_type = ActionActivationType.LLM_JUDGE # 消息接收时激活(?)
|
||||
parallel_action = False
|
||||
chat_type_allow = ChatType.GROUP
|
||||
|
||||
# === 功能描述(必须填写)===
|
||||
action_parameters = {
|
||||
|
||||
@@ -15,6 +15,7 @@ from src.common.database.sqlalchemy_models import Messages, PersonInfo
|
||||
from src.common.logger import get_logger
|
||||
from src.plugin_system.apis import send_api
|
||||
from .qq_emoji_list import qq_face
|
||||
from src.plugin_system.base.component_types import ChatType
|
||||
|
||||
logger = get_logger("set_emoji_like_plugin")
|
||||
|
||||
@@ -50,6 +51,7 @@ class SetEmojiLikeAction(BaseAction):
|
||||
action_name = "set_emoji_like"
|
||||
action_description = "为消息设置表情回应/贴表情"
|
||||
activation_type = ActionActivationType.ALWAYS # 消息接收时激活(?)
|
||||
chat_type_allow = ChatType.GROUP
|
||||
parallel_action = True
|
||||
|
||||
# === 功能描述(必须填写)===
|
||||
|
||||
Reference in New Issue
Block a user