Skip to content

Commit

Permalink
chore(hello): change plugin logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvent committed Jun 14, 2023
1 parent bb737a7 commit 1963ff2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/hello/hello.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def on_handle_context(self, e_context: EventContext):
e_context["context"].type = ContextType.TEXT
msg: ChatMessage = e_context["context"]["msg"]
e_context["context"].content = f'请你随机使用一种风格说一句问候语来欢迎新用户"{msg.actual_user_nickname}"加入群聊。'
e_context.action = EventAction.CONTINUE # 事件继续,交付给下个插件或默认逻辑
e_context.action = EventAction.BREAK # 事件结束,进入默认处理逻辑
return

if e_context["context"].type == ContextType.PATPAT:
e_context["context"].type = ContextType.TEXT
msg: ChatMessage = e_context["context"]["msg"]
e_context["context"].content = f"请你随机使用一种风格介绍你自己,并告诉用户输入#help可以查看帮助信息。"
e_context.action = EventAction.CONTINUE # 事件继续,交付给下个插件或默认逻辑
e_context.action = EventAction.BREAK # 事件结束,进入默认处理逻辑
return

content = e_context["context"].content
Expand Down

0 comments on commit 1963ff2

Please sign in to comment.