aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/constants.py5
-rw-r--r--bot/seasons/christmas/__init__.py2
-rw-r--r--bot/seasons/evergreen/__init__.py12
-rw-r--r--bot/seasons/halloween/timeleft.py2
-rw-r--r--bot/seasons/season.py9
5 files changed, 18 insertions, 12 deletions
diff --git a/bot/constants.py b/bot/constants.py
index 9c4f102c..bea595d6 100644
--- a/bot/constants.py
+++ b/bot/constants.py
@@ -1,6 +1,7 @@
import logging
from os import environ
from typing import NamedTuple
+from datetime import datetime
__all__ = (
"AdventOfCode", "Channels", "Client", "Colours", "Emojis", "Hacktoberfest", "Roles", "Tokens",
@@ -13,10 +14,10 @@ log = logging.getLogger(__name__)
class AdventOfCode:
leaderboard_cache_age_threshold_seconds = 3600
- leaderboard_id = 363275
+ leaderboard_id = 631135
leaderboard_join_code = str(environ.get("AOC_JOIN_CODE", None))
leaderboard_max_displayed_members = 10
- year = 2018
+ year = int(environ.get("AOC_YEAR", datetime.utcnow().year))
role_id = int(environ.get("AOC_ROLE_ID", 518565788744024082))
diff --git a/bot/seasons/christmas/__init__.py b/bot/seasons/christmas/__init__.py
index ae93800e..6f6efe51 100644
--- a/bot/seasons/christmas/__init__.py
+++ b/bot/seasons/christmas/__init__.py
@@ -22,5 +22,5 @@ class Christmas(SeasonBase):
colour = Colours.dark_green
icon = (
- "/logos/logo_seasonal/christmas/festive.png",
+ "/logos/logo_seasonal/christmas/2019/festive_512.gif",
)
diff --git a/bot/seasons/evergreen/__init__.py b/bot/seasons/evergreen/__init__.py
index b95f3528..b3d0dc63 100644
--- a/bot/seasons/evergreen/__init__.py
+++ b/bot/seasons/evergreen/__init__.py
@@ -6,8 +6,12 @@ class Evergreen(SeasonBase):
bot_icon = "/logos/logo_seasonal/evergreen/logo_evergreen.png"
icon = (
- "/logos/logo_animated/heartbeat/heartbeat.gif",
- "/logos/logo_animated/spinner/spinner.gif",
- "/logos/logo_animated/tongues/tongues.gif",
- "/logos/logo_animated/winky/winky.gif",
+ "/logos/logo_animated/heartbeat/heartbeat_512.gif",
+ "/logos/logo_animated/spinner/spinner_512.gif",
+ "/logos/logo_animated/tongues/tongues_512.gif",
+ "/logos/logo_animated/winky/winky_512.gif",
+ "/logos/logo_animated/jumper/jumper_512.gif",
+ "/logos/logo_animated/apple/apple_512.gif",
+ "/logos/logo_animated/blinky/blinky_512.gif",
+ "/logos/logo_animated/runner/runner_512.gif",
)
diff --git a/bot/seasons/halloween/timeleft.py b/bot/seasons/halloween/timeleft.py
index 77767baa..8cb3f4f6 100644
--- a/bot/seasons/halloween/timeleft.py
+++ b/bot/seasons/halloween/timeleft.py
@@ -25,7 +25,7 @@ class TimeLeft(commands.Cog):
year = now.year
if now.month > 10:
year += 1
- end = datetime(year, 10, 31, 11, 59, 59)
+ end = datetime(year, 11, 1, 11, 59, 59)
start = datetime(year, 10, 1)
return now, end, start
diff --git a/bot/seasons/season.py b/bot/seasons/season.py
index 3546fda6..e7b7a69c 100644
--- a/bot/seasons/season.py
+++ b/bot/seasons/season.py
@@ -79,6 +79,7 @@ class SeasonBase:
start_date: Optional[str] = None
end_date: Optional[str] = None
+ should_announce: bool = False
colour: Optional[int] = None
icon: Tuple[str, ...] = ("/logos/logo_full/logo_full.png",)
@@ -268,11 +269,11 @@ class SeasonBase:
"""
Announces a change in season in the announcement channel.
- It will skip the announcement if the current active season is the "evergreen" default season.
+ Auto-announcement is configured by the `should_announce` `SeasonBase` attribute
"""
- # Don't actually announce if reverting to normal season
- if self.name in ("evergreen", "wildcard", "halloween"):
- log.debug(f"Season Changed: {self.name}")
+ # Short circuit if the season had disabled automatic announcements
+ if not self.should_announce:
+ log.debug(f"Season changed without announcement: {self.name}")
return
guild = bot.get_guild(Client.guild)