From 52f80ad7cb917b70a7fcf54846b1cd669fc17919 Mon Sep 17 00:00:00 2001 From: Leander Furumo Date: Fri, 14 Nov 2025 22:11:56 +0100 Subject: [PATCH] manually check for good aurora sighting conditions --- src/cogs/aurora.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/cogs/aurora.py b/src/cogs/aurora.py index 0e49526..483083e 100644 --- a/src/cogs/aurora.py +++ b/src/cogs/aurora.py @@ -51,9 +51,14 @@ class Aurora(commands.Cog): if (start - datetime.now()) > timedelta(hours=12): continue - # We're gonna trust this value. Hopefully it takes sunlight, cloud cover and solar activity into account - # We're using an undocumented API so who knows. They probably know what they're doing over there. - if interval["auroraValue"] >= 0.5: + # We used to use "auroraValue" but it is deemed unreliable. + # We're using an undocumented API so who knows what it really means. + # Thus we need to guess what's considered good conditions ourselves + if ( + interval["sunglight"]["id"] == "night" + and interval["kpIndex"] >= 5 + and interval["cloudCover"]["value"] < 50 + ): valid_sightings.append(interval) if not valid_sightings: