Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Starter feed: a deleted message breaks every later update for that issue

Closed Beginner friendly
#58 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
api, backend

Research direction

Start with writeFeed in src/webhook.ts, then read DiscordError, sendMessage and editMessage in src/discord.ts and compare the recovery path in src/checkin.ts. Update the starter feed handling for a 404 according to whether the issue is open, including during resync. Add the cases to the starter issue feed tests in test/webhook.test.ts; done means the acceptance criteria pass, including preserving behavior for other errors.

Written by the indexing model from the issue text.

Description

bug good first issue hacktoberfest

The bot keeps one message per starter issue in #starter-issues and edits it when the issue is claimed, freed or closed (writeFeed in src/webhook.ts, line 108). If someone deletes that message in Discord, the stored message id points at nothing:

  • every later update for the issue tries to edit it (line 113), Discord answers 404 "Unknown Message", and the webhook returns a 500, because onIssue only handles a 429 (line 156)
  • the cron resync logs "starter issue resync failed" and drops its mark (line 184)

So that issue never comes back to the feed, even when it's free to take again.

Check-ins already handle the same case: when a learner's log thread is gone, postToLog starts a new one (src/checkin.ts, lines 133 to 142).

What to do

  • In writeFeed, when editMessage fails with a DiscordError whose status is 404:
    • if the issue is free to take (state.kind === "open"), post a new message with sendMessage and store its id
    • otherwise, delete the stored record, so the issue gets a fresh message once it's free again
  • Other errors work the way they do now: a 429 still goes to the resync.

Where to look

  • src/webhook.ts: writeFeed (line 108), onIssue (line 122) and resyncStarterIssues (line 163)
  • src/discord.ts: DiscordError (line 43), sendMessage (line 118) and editMessage (line 131)
  • src/checkin.ts: postToLog (line 128)
  • test/webhook.test.ts: the starter issue feed tests (line 62)

Acceptance criteria

  • When the stored message is gone and the issue is free, an update posts a new message, stores its id, and the webhook answers 200
  • When the stored message is gone and the issue isn't free, the stored record is removed and the webhook answers 200
  • The resync handles the same two cases
  • Other Discord errors behave as before
  • Tests for these cases
  • npm run typecheck and npm test pass

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 #58 in the description.

Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
12h 22m
Merged PRs (30d)
36

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from codercops/discord-bot

All issues in codercops/discord-bot

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.