chore(feishu): document reaction emoji option and promote filetype dep

Add an info log for `RandomReactionEmoji` configuration.
This commit is contained in:
mutezebra
2026-03-06 12:53:48 +08:00
parent 9f017d077e
commit 92a0db4993
3 changed files with 4 additions and 2 deletions
+1
View File
@@ -36,3 +36,4 @@
3. 配置事件订阅和Webhook URL
4. 设置加密(可选,生产环境建议启用)
5. 将 App ID、App Secret、Encrypt Key 和 Verification Token(如果启用加密) 填入配置文件中
6. 自定义你希望 PicoClaw react 你消息时的表情(可选, Reference URL: [Feishu Emoji List](https://open.larkoffice.com/document/server-docs/im-v1/message-reaction/emojis-introduce))
+1 -1
View File
@@ -11,6 +11,7 @@ require (
github.com/gdamore/tcell/v2 v2.13.8
github.com/google/uuid v1.6.0
github.com/gorilla/websocket v1.5.3
github.com/h2non/filetype v1.1.3
github.com/larksuite/oapi-sdk-go/v3 v3.5.3
github.com/mdp/qrterminal/v3 v3.2.1
github.com/modelcontextprotocol/go-sdk v1.3.0
@@ -37,7 +38,6 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/elliotchance/orderedmap/v3 v3.1.0 // indirect
github.com/gdamore/encoding v1.0.1 // indirect
github.com/h2non/filetype v1.1.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
+2 -1
View File
@@ -204,6 +204,7 @@ func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID st
// Default to "Pin" if no config
emojiList = []string{"Pin"}
}
logger.Info(fmt.Sprintf("[MABEN] c.config.RandomReactionEmoji, %v", c.config.RandomReactionEmoji))
// Randomly choose one from the list
chosenEmoji := emojiList[rand.Intn(len(emojiList))]
@@ -218,7 +219,7 @@ func (c *FeishuChannel) ReactToMessage(ctx context.Context, chatID, messageID st
resp, err := c.client.Im.V1.MessageReaction.Create(ctx, req)
if err != nil {
logger.ErrorCF("feishu", "Failed to add reaction", map[string]any{
"emoji": chosenEmoji,
"emoji": chosenEmoji,
"message_id": messageID,
"error": err.Error(),
})