Implement: vpc-bot-comp-corner-pin-fix.md - #9
Merged
Merged
Conversation
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.
Auto-generated from vault spec
notes/vpc-bot-comp-corner-pin-fix.md.Fix Pin Weekly Embed Instead of Updating Old Pin
There are two issues that were not resolved by Dispatched PR #7:
In both case, the #tounament-corner announcements of new tournaments works correct, by unpinning the old post, pinning the new post and only messaging the new post once.
Expanded Spec
Problem
The
create-weekprocess currently updates an existing message for the weekly competition embed instead of posting a new one, causing stale content to persist. Additionally, the process triggers a double-post (or redundant message creation) for the announcement. ThepinNewWeeklyCompetitionlogic (or the lack thereof in thecreate-weekflow) does not match the successful implementation used insrc/services/scheduler.jsfor tournament announcements, which correctly unpins old posts, pins the new one, and performs cleanup of system messages.Acceptance Criteria
src/services/scheduler.js, specifically ensuring the old weekly pin is removed and system pin messages are cleaned up.Notes for implementer
pinNewTournamentfunction insrc/services/scheduler.jsas a template for the pinning/unpinning lifecycle.src/lib/output/messages.jsto include a helper function (e.g.,pinNewWeeklyCompetition) that handles the logic of finding the current week's pin by title/embed signature, unpinning it, and pinning the new one.src/commands/competition/create-week.jsto ensure the flow doesn't accidentally trigger an "update" path inherited from previous logic that was intended to overwrite messages rather than replace them.