Commit b4027e5
discord-feedback: don't require the Discord token when resume skips scraping (#240)
## Problem
The Discord bot token was validated unconditionally at startup — before
the resume fast-path that re-attaches to an already-opened PR and only
watches it. That fast-path never touches Discord, so resuming a watch
from a fresh shell without the token (e.g. a new `screen` window after
the session was lost) died immediately:
```
Error: DISCORD_BOT_TOKEN is not set. Create a Discord bot token and export it first.
```
…despite needing no Discord access at all.
## Fix
Move the token requirement to point-of-use, right before the scrape.
Resumes that skip the scrape (the create-pr fast-path) now run
tokenless; a real scrape still fails fast with the same clear message.
GitHub auth already falls back to `gh auth token`, so a watch-only
resume needs no exported secrets.
Verified live: a fresh screen window with no `DISCORD_BOT_TOKEN` now
resumes straight into watching PR #238.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4f2d878 commit b4027e5
1 file changed
Lines changed: 7 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3389 | 3389 | | |
3390 | 3390 | | |
3391 | 3391 | | |
| 3392 | + | |
| 3393 | + | |
| 3394 | + | |
3392 | 3395 | | |
3393 | | - | |
3394 | | - | |
3395 | | - | |
3396 | | - | |
3397 | 3396 | | |
3398 | 3397 | | |
3399 | 3398 | | |
| |||
3486 | 3485 | | |
3487 | 3486 | | |
3488 | 3487 | | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
3489 | 3492 | | |
3490 | 3493 | | |
3491 | 3494 | | |
| |||
0 commit comments