Skip to content

Skip posting vote results when poll data is unreadable#10

Open
its-applekid wants to merge 1 commit into
its-everdred:mainfrom
its-applekid:fix/skip-unreadable-poll-results
Open

Skip posting vote results when poll data is unreadable#10
its-applekid wants to merge 1 commit into
its-everdred:mainfrom
its-applekid:fix/skip-unreadable-poll-results

Conversation

@its-applekid
Copy link
Copy Markdown
Contributor

When voteResults is null (poll can't be read from Discord), skip posting results instead of creating and posting misleading all-zero results.

This prevents confusing 'failure' messages with 0 voters and 0% participation when the actual issue is that Gary couldn't read the poll data from EasyPoll.

Changes

  • Removed creation of expiredResults object with all zeros
  • Added informative log message when poll results are unreadable
  • Results are now only posted when actually readable

Testing

Verified logic path in apps/bot/src/lib/jobScheduler.ts lines 504-522

When voteResults is null (poll can't be read from Discord), skip posting
results instead of creating and posting misleading all-zero results.

This prevents confusing 'failure' messages with 0 voters and 0% participation
when the actual issue is that Gary couldn't read the poll data from EasyPoll.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant