mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-16 00:52:40 +00:00
Coop: substitute {count} and {leader} placeholders in gift flavor
The TwinBeeGiftArrival pool entries each end with a templated footer
authored to the spec format ("Open: {count} · Leave it: {count}\nMajority
rules. Ties go to {leader}."), but the placeholders were never being
substituted — players saw the literal "{count}" and "{leader}" strings.
Substitute in renderCoopGiftPost: ordered Replace for the two {count}
positions (opens, then leaves), ReplaceAll for {leader}. Also dropped
the redundant "Current votes:" line my code was appending — the flavor's
own tally line covers it after substitution.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -412,7 +412,7 @@ func (p *AdventurePlugin) handleCoopAdmGift(ctx MessageContext, args string) err
|
||||
gift, _ := loadCoopGift(giftID)
|
||||
members, _ := loadCoopMembers(runID)
|
||||
if gift != nil {
|
||||
postID, perr := p.SendMessageID(gr, renderCoopGiftPost(run, gift, members))
|
||||
postID, perr := p.SendMessageID(gr, renderCoopGiftPost(p, run, gift, members))
|
||||
if perr == nil {
|
||||
_ = saveCoopGiftPostID(giftID, postID)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user