File tree Expand file tree Collapse file tree 2 files changed +1
-7
lines changed
Expand file tree Collapse file tree 2 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ You can run it by following steps:
88 ``` yaml
99 cherry-pick-invite.audit_webhook : <your_audit_lark_webhook>
1010 cherry-pick-invite.github_token : <your_github_token>
11- bot_name : <your_bot_name> # 机器人名称,用于在群聊中匹配@消息,默认为"机器人"
11+ bot_name : <your_bot_name> # bot name in lark
1212 ` ` `
13132. Run the lark bot app:
1414 ` ` ` bash
Original file line number Diff line number Diff line change @@ -51,17 +51,11 @@ func main() {
5151 }
5252 producerCli := lark .NewClient (* appID , * appSecret , producerOpts ... )
5353
54- // 加载配置
5554 cfg := loadConfig (* config )
5655
57- // 创建事件处理器,同时注册私聊和群聊消息处理函数
5856 eventHandler := dispatcher .NewEventDispatcher ("" , "" ).
5957 OnP2MessageReceiveV1 (handler .NewRootForMessage (producerCli , cfg ))
6058
61- // 注册群组消息处理函数,如果SDK支持的话
62- // 注意:目前的SDK版本可能不支持OnGroupMessageReceiveV1方法
63- // 如果不支持,可以通过修改OnP2MessageReceiveV1处理函数来同时处理私聊和群聊消息
64-
6559 consumerOpts := []larkws.ClientOption {larkws .WithEventHandler (eventHandler )}
6660 if * debugMode {
6761 consumerOpts = append (consumerOpts ,
You can’t perform that action at this time.
0 commit comments