Merge branch 'dev' of https://github.com/MoFox-Studio/MoFox_Bot into dev
This commit is contained in:
@@ -156,7 +156,10 @@ class SendHandler:
|
||||
logger.error("命令或参数缺失")
|
||||
return None
|
||||
|
||||
logger.info(f"准备向 Napcat 发送命令: command='{command}', args_dict='{args_dict}'")
|
||||
response = await self.send_message_to_napcat(command, args_dict)
|
||||
logger.info(f"收到 Napcat 的命令响应: {response}")
|
||||
|
||||
if response.get("status") == "ok":
|
||||
logger.info(f"命令 {command_name} 执行成功")
|
||||
else:
|
||||
@@ -530,12 +533,14 @@ class SendHandler:
|
||||
Returns:
|
||||
Tuple[CommandType, Dict[str, Any]]
|
||||
"""
|
||||
logger.info(f"开始处理表情回应命令, 接收到参数: {args}")
|
||||
try:
|
||||
message_id = int(args["message_id"])
|
||||
emoji_id = int(args["emoji_id"])
|
||||
set_like = str(args["set"])
|
||||
except:
|
||||
raise ValueError("缺少必需参数: message_id 或 emoji_id")
|
||||
except (KeyError, ValueError) as e:
|
||||
logger.error(f"处理表情回应命令时发生错误: {e}, 原始参数: {args}")
|
||||
raise ValueError(f"缺少必需参数或参数类型错误: {e}")
|
||||
|
||||
return (
|
||||
CommandType.SET_EMOJI_LIKE.value,
|
||||
|
||||
@@ -140,7 +140,7 @@ class PokeAction(BaseAction):
|
||||
# === 基本信息(必须填写)===
|
||||
action_name = "poke_user"
|
||||
action_description = "向用户发送戳一戳"
|
||||
activation_type = ActionActivationType.ALWAYS
|
||||
activation_type = ActionActivationType.LLM_JUDGE
|
||||
parallel_action = True
|
||||
|
||||
# === 功能描述(必须填写)===
|
||||
@@ -157,8 +157,10 @@ class PokeAction(BaseAction):
|
||||
3. **互动提醒**: 你想以一种有趣的方式提醒或与某人互动,但请确保这是对话的自然延伸,而不是无故打扰。
|
||||
4. **上下文需求**: 上下文明确需要你戳一个或多个人。
|
||||
5. **频率限制**: 如果最近已经戳过,或者用户情绪不高,请绝对不要使用。
|
||||
|
||||
请回答"是"或"否"。
|
||||
6. **核心原则**:
|
||||
* 这是一个**强打扰**且**高消耗**的动作。
|
||||
* **禁止**在模糊情境下使用。
|
||||
请严格根据上述规则,回答“是”或“否”。
|
||||
"""
|
||||
associated_types = ["text"]
|
||||
|
||||
@@ -169,6 +171,8 @@ class PokeAction(BaseAction):
|
||||
|
||||
try:
|
||||
times = int(self.action_data.get("times", 1))
|
||||
if times > 3:
|
||||
times = 3
|
||||
except (ValueError, TypeError):
|
||||
times = 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user