aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/season.py
diff options
context:
space:
mode:
authorGravatar Mark <[email protected]>2019-12-03 22:17:55 -0800
committerGravatar GitHub <[email protected]>2019-12-03 22:17:55 -0800
commit8e21889d68be318c662a464ecaaeaf0bc1864424 (patch)
tree15dc5c0860b2180d682f096df061360f468a5897 /bot/seasons/season.py
parentReadd user agent to request header (diff)
parentMerge pull request #308 from python-discord/dependabot/pip/pillow-6.2.0 (diff)
Merge branch 'master' into exclude-draft-prs
Diffstat (limited to 'bot/seasons/season.py')
-rw-r--r--bot/seasons/season.py9
1 files changed, 5 insertions, 4 deletions
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)