Add configurable user @mention for daily wife and rob-success messages#1
Merged
Merged
Conversation
Copilot
AI
changed the title
[WIP] Add functionality to @mention users in daily messages
Add configurable user @mention for daily wife and rob-success messages
Jun 9, 2026
CWalkene
marked this pull request as ready for review
June 9, 2026 03:36
There was a problem hiding this comment.
Pull request overview
This PR adds a new console configuration switch to optionally @mention the initiating user in “今日老婆” and “抢老婆成功” outbound messages, by extending the shared image-send helper and wiring the caller IDs through the daily/rob flows.
Changes:
- Added
DailyWifeAtUserboolean config (defaultTrue) to control whether the trigger user is @mentioned. - Extended
_send_role_image()to accept an optionaluser_idand prependMessageSegment.at(user_id)when enabled. - Updated daily-wife and rob-success send paths to pass the appropriate user id and to
@mentionin the rob-success text-only branch.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| README.md | Documents the new DailyWifeAtUser configuration option. |
| config_default.py | Introduces the DailyWifeAtUser toggle in default plugin config. |
| init.py | Implements optional @mention behavior in message send flows and helper. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+32
to
+36
| 'DailyWifeAtUser': GsBoolConfig( | ||
| '发送时艾特触发者', | ||
| '开启后发送今日老婆和抢老婆成功图片时会艾特对应用户', | ||
| True, | ||
| ), |
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.
This change adds optional @mention behavior to outbound wife messages so the initiating user is explicitly pinged. It covers both
今日老婆and successful抢老婆flows, controlled by a new console config switch.Config: add mention toggle
DailyWifeAtUserinconfig_default.py(boolean, defaultTrue).@userin daily-wife and rob-success sends without changing templates.Message send path: support optional target user
_send_role_image()signature to acceptuser_id.DailyWifeAtUseris enabled anduser_idis provided, prependsMessageSegment.at(user_id)before text/image payload.Call-site wiring
ev.user_idinto_send_role_image().robber_idinto_send_role_image().DailyWifeSendText=False) now also applies@robberwhen enabled.