Browse Source

fix: hello plugin trigger app bug

master
zhayujie 11 months ago
parent
commit
14ae2f169a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      plugins/hello/hello.py

+ 2
- 2
plugins/hello/hello.py View File

@@ -39,13 +39,13 @@ class Hello(Plugin):
reply.content = conf().get("group_welcome_msg", "") reply.content = conf().get("group_welcome_msg", "")
e_context["reply"] = reply e_context["reply"] = reply
e_context.action = EventAction.BREAK_PASS # 事件结束,并跳过处理context的默认逻辑 e_context.action = EventAction.BREAK_PASS # 事件结束,并跳过处理context的默认逻辑
if not self.config or not self.config.get("use_character_desc"):
e_context["context"]["generate_breaked_by"] = EventAction.BREAK_PASS
return return
e_context["context"].type = ContextType.TEXT e_context["context"].type = ContextType.TEXT
msg: ChatMessage = e_context["context"]["msg"] msg: ChatMessage = e_context["context"]["msg"]
e_context["context"].content = f'请你随机使用一种风格说一句问候语来欢迎新用户"{msg.actual_user_nickname}"加入群聊。' e_context["context"].content = f'请你随机使用一种风格说一句问候语来欢迎新用户"{msg.actual_user_nickname}"加入群聊。'
e_context.action = EventAction.BREAK # 事件结束,进入默认处理逻辑 e_context.action = EventAction.BREAK # 事件结束,进入默认处理逻辑
if not self.config or not self.config.get("use_character_desc"):
e_context["context"]["generate_breaked_by"] = EventAction.BREAK
return return
if e_context["context"].type == ContextType.EXIT_GROUP: if e_context["context"].type == ContextType.EXIT_GROUP:


Loading…
Cancel
Save