Bladeren bron

chore(hello): change plugin logic

master
lanvent 1 jaar geleden
bovenliggende
commit
1963ff273f
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. +2
    -2
      plugins/hello/hello.py

+ 2
- 2
plugins/hello/hello.py Bestand weergeven

@@ -34,14 +34,14 @@ class Hello(Plugin):
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


Laden…
Annuleren
Opslaan