feat(feishu): add random reaction emoji config#1171
Conversation
- Add random_reaction_emoji config for Feishu channel - Update .env.example with new env vars - Update documentation (README.zh.md)
Add an info log for `RandomReactionEmoji` configuration.
|
This PR looks good, please resolve the conflicts and prepare for merging |
pkg/channels/feishu/feishu_64.go
Outdated
| // Default to "Pin" if no config | ||
| emojiList = []string{"Pin"} | ||
| } | ||
| logger.Info(fmt.Sprintf("[MABEN] c.config.RandomReactionEmoji, %v", c.config.RandomReactionEmoji)) |
There was a problem hiding this comment.
Is this log a debug log? Perhaps it needs to be deleted
There was a problem hiding this comment.
sorry, i will fix that
pkg/channels/feishu/feishu_64.go
Outdated
| logger.Info(fmt.Sprintf("[MABEN] c.config.RandomReactionEmoji, %v", c.config.RandomReactionEmoji)) | ||
|
|
||
| // Randomly choose one from the list | ||
| chosenEmoji := emojiList[rand.Intn(len(emojiList))] |
There was a problem hiding this comment.
nit: This might be pseudo-random, but it's not a big deal and won't affect the merge.
There was a problem hiding this comment.
"Hi, I've run make lint and updated the implementation to the 'true random' approach suggested by the AI."
|
@alexhoshina Hello, sorry to bother you, but I have little experience contributing to open-source projects. I'd like to ask, when will a PR be merged? |
|
hi, @mutezebra I'm evaluating whether we need to introduce the relatively heavy |
…i-v2 feat(feishu): add random reaction emoji config
|
@mutezebra Random reaction emoji config for Feishu is a fun feature, makes the bot feel less robotic when interacting in group chats. Nice addition. We have a PicoClaw Dev Group on Discord for contributors to connect and share ideas. If you want to join, send an email to |
Thank you for your comment. I am very interested in it and have already sent the email. |
…i-v2 feat(feishu): add random reaction emoji config
…i-v2 feat(feishu): add random reaction emoji config
📝 Description
This PR introduces a new configuration option
random_reaction_emojifor the Feishu (Lark) channel.It allows users to customize the emoji reaction used by the bot when processing messages.
["Typing", "OncSecond"]).["Pin"]if the configuration is missing, preserving existing behavior.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
📚 Technical Context (Skip for Docs)
The default "Pin" emoji reaction was hardcoded, which some users found undesirable. Changing it required modifying the source code and recompiling.
This change makes the reaction emoji configurable via
config.jsonor environment variables (PICOCLAW_CHANNELS_FEISHU_RANDOM_REACTION_EMOJI).Additionally, supporting a random selection from a list adds variety and makes the bot feel more dynamic/human-like compared to a static emoji.
🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
☑️ Checklist