Feat/substitute mode#401
Open
mahongchaodev wants to merge 4 commits into
Open
Conversation
added 2 commits
July 8, 2026 11:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
普通群里,用户经常会自然地 @ 某个负责人或值班人,而不是 @ 机器人。这个 PR 增加“替身模式”:当群消息 @ 到配置的替身对象时,botmux 可以把这条消息视为对当前 bot 的请求,由 bot 在同一个普通群会话里代答,常常配合个人知识库使用。
该功能适合搭配 Oncall 模式使用:Oncall 让群成员具备 canTalk,替身模式让群成员可以自然 @ 替身对象触发 bot 代答。
核心改动
权限与边界
使用方式
Dashboard 或 bots.json 配置示例:
{ "substituteMode": { "enabled": true, "disclosure": "prefix", "targets": [ { "name": "马洪超", "userId": "ge897abb", "openId": "ou_8b8570da90e6694261be27662d9becf6", "unionId": "on_03f32fd6a6f361505d8a2a65a79455b3", "email": "[mahongchao.chaotian@bytedance.com](mailto:mahongchao.chaotian@bytedance.com)" } ] } }群内开关:
推荐配置:
实现要点
验证
已通过:
注意事项