Announce a contributor program in #leaderboard when it starts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- nodejs, typescript
- Domain
- backend
Research direction
Start in src/index.ts at dailyPosts (line 463) and read the final-results path (lines 487-511) to copy its started:<id> KV mark, retry-on-failure and one-week window. Add programStartMessage(program, { url }) to src/messages.ts beside leaderboardMessage (line 136), reusing dateRange from src/page.ts (line 17). Drive it with the scheduled tests in test/index.test.ts (line 262), calling worker.scheduled at 2026-12-01T04:30:00Z and 2026-12-02T04:30:00Z and asserting on fetched.discord(); done is all acceptance boxes checked and npm run typecheck plus npm test green.
Written by the indexing model from the issue text.
Description
There's a new program every month now, but nothing in Discord says when one starts. The daily run (dailyPosts, src/index.ts, line 463) posts a running program's board on Mondays (line 478) and its final results once it ends (line 487). December starts on a Tuesday, so the first time #leaderboard mentions it will be the weekly board on December 7.
A short post on the first run after a program starts would tell people the new month is on, right after the old month's final results, while they're paying attention.
What to do
- Add a message builder to
src/messages.ts, for exampleprogramStartMessage(program, { url }), with no I/O like the others. It should give the title, the dates (dateRangeinsrc/page.ts, line 17, already writes "Dec 1 to Dec 31, 2026 (UTC)"), what counts (the label and the repos), the minimum, how many people win what, the note if there is one, a link to the program page, and a pointer to/issues. It must not ping anyone. - In
dailyPosts, send it toCHANNEL_LEADERBOARDonce per program, on the first run afterstart. Copy how the final results do it (lines 487 to 511): astarted:<id>mark in KV so it goes out once, another try on the next run if sending fails, and only within a week of the start, so adding an older program to the config doesn't announce it. - When a program starts on a Monday, send the start post instead of that day's weekly board, which would be empty anyway.
- Mention it in the daily cron row of the "How it works" table in README.md.
Where to look
src/index.ts:dailyPosts(line 463)src/messages.ts:leaderboardMessage(line 136), for how the footer and the page link are writtentest/index.test.ts: the "scheduled leaderboard" tests (line 262)
Acceptance criteria
- On the first daily run in a program's first week, one start post goes to the leaderboard channel, and none on later runs
- If sending fails, it's tried again on the next run
- A program whose start was more than a week ago is never announced
- A program that starts on a Monday gets the start post and no weekly board that day
- On December 1 the order is November's final results, then December's start post
- Tests for these cases
-
npm run typecheckandnpm testpass
How to test
The scheduled tests call worker.scheduled at a given time, so you can run, for example, 2026-12-01T04:30:00Z and 2026-12-02T04:30:00Z with a November and a December program and check what fetched.discord() holds after each. Some existing tests run inside a program's first week and will now see the extra post: "handles several programs, each on its own" (line 345) runs on November 2 with a November program. Update their expectations, or set the started: mark in KV where a test isn't about the start post.
Want to work on this? Comment below and I'll assign it to you. Please take one issue at a time, branch off develop, and open your PR against develop with Closes #153 in the description.
- Dominant language
- TypeScript
- Stars
- 0
- Forks
- 1
- Avg merge
- 2h 38m
- Merged PRs (30d)
- 73
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codercops/discord-bot
-
`/leaderboard`, the page and the share image say "be the first" for a program that hasn't startedOpenbug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
codercops/discord-bot#152 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codercops/discord-bot#108 · 1 comment ·
Maintainers usually reply within 1 day
-
Keep the slash command list in one module, and test that `/help` and the registered commands matchOpenhelp wanted testing
Difficulty 3/5 1-2 days Newbie friendliness 78/100
codercops/discord-bot#154 ·
Maintainers usually reply within 1 day
-
Contributing to discord-bot: start hereMay be free again @sank8-2 claimed this 21 days ago, and no pull request is open. Open
Difficulty 1/5 Under an hour Newbie friendliness 15/100
codercops/discord-bot#15 · 4 comments ·
Maintainers usually reply within 1 day
All issues in codercops/discord-bot
Similar issues
-
Out of order / duplicate key error shows the key bytes as decimal or UTF-8, not hexPossibly taken @bardrop claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 86/100
-
bug i18n
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
endora-commerce/endora-commerce#1315 ·
Maintainers usually reply within 1 day
-
area:data-quality importer size:S
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
enorm-labs/event-junkie#5136 ·
Maintainers usually reply within 1 day
-
fix(scripts): set-device-owner.ps1 fails to parse on Windows PowerShell 5.1 (UTF-8 without BOM)Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
WenyuChiou/agent-board#1518 ·
Maintainers usually reply within 1 day