Releases: jschollenberger/Discord-Weather-Bot
Releases · jschollenberger/Discord-Weather-Bot
Release list
v3.2.5
Added
- NWS Test / Exercise / System / Draft alerts are no longer forwarded — e.g. the periodic Tsunami Warning test that blasts the whole state. Only real alerts (CAP
status=Actual) post, and they're dropped at the fetch source so no consumer (alerts, weekly count, morning briefing) ever sees them. Fails open: an alert with a missing/unknown status is still treated as actual, since suppressing a genuine warning is worse than forwarding a test.
Changed
- Quieter logs during a Discord gateway outage. discord.py logs every reconnect attempt at
ERRORwith a full traceback; during an outage that's a wall of identical stacks that buries whether and when the bot recovered. Those transient reconnect records are now collapsed to a singleWARNINGline that keeps the cause (e.g.Attempting a reconnect in 716.24s [WSServerHandshakeError: 503]) and drops the stack trace. Real errors from anywhere else are untouched.
v3.2.4
Added
- Build identity in the startup banner,
/statusfooter, and startup log line. When running from source ahead of the latest release tag (or with uncommitted edits), these now show e.g.v3.2.4 (build v3.2.3-4-g129acde[-dirty])so it's clear exactly which commit is running — not just the last release number. Derived fromgit describe --tags --always --dirtyat startup; on an exact tagged release it collapses to the clean tag (no suffix), and if git isn't available (e.g. a zip download) it falls back to__version__alone.__version__remains the authoritative release number for the changelog, releases, and the HTTPUser-Agent(which stay clean semver).
v3.2.3
Added
- The startup banner now shows the morning-briefing schedule (
Briefing : 06:00 ET, ordisabled), alongside the existingWeeklyline — so you can confirm at a glance whether the daily briefing is on, the same way you can for the weekly summary.
v3.2.2
Fixed
- Logging no longer breaks (and floods the console with tracebacks) when the log file's handle is invalidated — e.g. the file lives on a network share or removable drive that reconnects, or the host sleeps and resumes. Previously a plain
FileHandlerwould raiseOSError(EINVAL) on every subsequent write, lose the record, and print a full traceback per record to the console. The file handler now transparently reopens the file and retries once on a write failure, so a transient blip resumes logging instead of silently dropping everything after it, andlogging.raiseExceptionsis disabled so an unrecoverable write drops the record quietly rather than dumping a stack trace. Credential redaction is unchanged. (Running the bot from local disk rather than a network share is still the more robust setup.)
v3.2.1
Changed
pin_conditions_messagenow defaults to false. Pinning makes Discord post a "pinned a message" system notice in the channel, and because the bot re-pins after every repost (conditions_repost_hours), that noise recurs. The conditions message is still found and edited in place by id, so pinning is no longer needed to keep it discoverable — enablepin_conditions_message: trueif you still want it pinned. Both example configs set it tofalse.
v3.2.0
Added
- Morning briefing — an optional, compact, once-daily post to the conditions channel with the "shape of the day", laid out in three lines: the forecast (condition, rain chance, and wind); the day's range and sky clock (high/low, sunrise/sunset, and today's forecast AQI, with an Action Day flagged by pollutant); and the active-alert state on a fixed last line. It deliberately omits current conditions (feels-like/humidity/observed wind/sky) — the pinned conditions message covers "right now" — carries no buttons, posts silently (no ping/notification), and links its title to the NWS point forecast. Enable with
briefing_enabled: true; time it withbriefing_hour(ET, default 6). Requires discord.py ≥ 2.1 for the silent send.
v3.1.4
Changed
- Log-quality tweaks. Exception log lines no longer leave a dangling
:when the exception's message is empty (e.g. a bareTimeoutError) — a new_exc()helper renders those as just the type name. And a/conditionsquery for a station the PWS provider can't find now logs atWARNINGinstead ofERROR, since a bad user-supplied station is input rather than a system fault (a failing default station remains anERROR). - CI: added a CodeQL config (
.github/codeql/codeql-config.yml) that excludes the test suite from analysis and filters theclear-text-logging-sensitive-dataquery — a false positive here, since_RedactFilterscrubs every log record before any handler writes it (a mitigation CodeQL's dataflow can't trace). CodeQL still gates on all other queries.
v3.1.3
Changed
- CI hardening: enabled ruff's bugbear (
B) lint rules (catches likely bugs such as mutable default arguments), added CodeQL security scanning (per-PR and weekly), and added Dependabot (monthly, grouped) forpipand GitHub Actions dependency updates.
v3.1.2
Fixed
- A failed send of a new NWS alert (e.g. a transient Discord error) was recorded as if it had posted, so a later cycle could emit a phantom "CLEARED" for an alert nobody saw. A failed send is no longer recorded — the alert is simply retried on the next cycle.
_clamp_embednow enforces the 6000-character aggregate limit by trimming oversized field values (and dropping trailing fields as a last resort), not only the description, so an embed dominated by large fields can no longer 400 on send.
Changed
- The
/aqiembed shows your configuredlocation_namein the title and moves the EPA/AirNow reporting-area name (e.g. "Southern Coastal") to the footer asreporting area: …, making it clear that name is AirNow's monitoring zone, not a bot setting.
v3.1.1
Fixed
- The
/conditionsand/statusPWSweather links used the wrong path (/station/mid/…); they now use/station/pws/<station-id>, matching pwsweather.com's station-page URLs.
Added
- Optional
pws_station_urlconfig key to set the exact public page for the default station's/conditionsand/statuslinks, overriding the derived URL — for a station whose PWSweather page id differs frompws_station_id, or a page hosted elsewhere.