feat: ask for stars and wishes in the campaign's Discord channel (#1255) #1256
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1255-stars-wishes-discord"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1255. For v4.7.0: 4.6.1 and 4.6.2 are tagged and on prod, so the hold is over. The wording was approved by the owner on the Wording Review page (part f, f-001, including the link pointing at Home).
When a session completes, the "Played" post the bot already makes in the campaign's channel gains one paragraph, only while Home is asking at least one player about the session:
Backend
session_feedback_service.discord_ask(db, session)returns{"stars_wishes": {url, closes_at, gm_name}}, or{}. It uses the same rule as Home's prompt andnotify_asked, which now share_players_asked(): the window is open, the campaign is live and unarchived, there are non-GM members with no answer yet, and the attendance rule applies. There's no ask without anAPP_URL.post_extraat both completion paths (complete_sessionandauto_complete_sessions).extrafield, so noBOT_CONTRACT_VERSIONbump. Both sides are in this PR.Bot
faces.stars_wishes()builds the line. The GM's name goes throughplain_name, and the name is left out when the campaign has no GM. The closing time is a<t:…:R>stamp, and the line is dropped if the time can't be read. There's no ask without asafe_urlHome link.faces.played()puts it in its own paragraph, and points the post's one link at Home when the ask is present (owner-approved). Without the block, the post is unchanged.played-askspecimen, golden rows intest_faces.py, and a row in thetest_faces_text.pyaudit.Tests (on docker-test, after merging main at 4.6.2)
test_session_feedback,test_bot_post_facts,test_archived_campaign_outbound,test_notifications_out,test_session_end_before_startandtest_sessions.Nothing about the session's content reaches Discord (D96 untouched). It can't be checked on dev: the dev bot has no Discord token.
🤖 Generated with Claude Code
WIP: feat: ask for stars and wishes in the campaign's Discord channel (#1255)to feat: ask for stars and wishes in the campaign's Discord channel (#1255)