aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar kwzrd <[email protected]>2020-03-08 17:39:51 +0100
committerGravatar kwzrd <[email protected]>2020-03-08 17:39:51 +0100
commit34dd2e2b6acd7b56c7d3ccb2380a9b0a1f28afb9 (patch)
tree77cbbce902ecdcf29af8dd8e1b15d2d9a4b4e129
parentDeseasonify: remove `Evergreen` season (diff)
Deseasonify: adjust inheriting seasons in accordance with new system
Ensure that all inheriting seasons are now providing the right attrs as defined in `SeasonBase`.
-rw-r--r--bot/seasons/christmas/__init__.py20
-rw-r--r--bot/seasons/easter/__init__.py16
-rw-r--r--bot/seasons/halloween/__init__.py13
-rw-r--r--bot/seasons/pride/__init__.py15
-rw-r--r--bot/seasons/valentines/__init__.py15
-rw-r--r--bot/seasons/wildcard/__init__.py13
6 files changed, 26 insertions, 66 deletions
diff --git a/bot/seasons/christmas/__init__.py b/bot/seasons/christmas/__init__.py
index 4287efb7..b8fb19f0 100644
--- a/bot/seasons/christmas/__init__.py
+++ b/bot/seasons/christmas/__init__.py
@@ -1,6 +1,4 @@
-import datetime
-
-from bot.constants import Colours
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -15,19 +13,9 @@ class Christmas(SeasonBase):
enjoy this festive season!
"""
- name = "christmas"
+ season_name = "Festive season"
bot_name = "Merrybot"
- greeting = "Happy Holidays!"
-
- start_date = "01/12"
- end_date = "01/01"
- colour = Colours.dark_green
- icon = (
- "/logos/logo_seasonal/christmas/2019/festive_512.gif",
- )
+ branding_path = "seasonal/christmas"
- @classmethod
- def end(cls) -> datetime.datetime:
- """Overload the `SeasonBase` method to account for the event ending in the next year."""
- return datetime.datetime.strptime(f"{cls.end_date}/{cls.current_year() + 1}", cls.date_format)
+ months = {Month.december}
diff --git a/bot/seasons/easter/__init__.py b/bot/seasons/easter/__init__.py
index dd60bf5c..5056bd7e 100644
--- a/bot/seasons/easter/__init__.py
+++ b/bot/seasons/easter/__init__.py
@@ -1,4 +1,4 @@
-from bot.constants import Colours
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -21,15 +21,11 @@ class Easter(SeasonBase):
will find you a task and teach you what you need to know.
"""
- name = "easter"
+ season_name = "Easter"
bot_name = "BunnyBot"
- greeting = "Happy Easter!"
- # Duration of season
- start_date = "02/04"
- end_date = "30/04"
+ description = "Bunny here, bunny there, bunny everywhere!"
- colour = Colours.pink
- icon = (
- "/logos/logo_seasonal/easter/easter.png",
- )
+ branding_path = "seasonal/easter"
+
+ months = {Month.april}
diff --git a/bot/seasons/halloween/__init__.py b/bot/seasons/halloween/__init__.py
index c81879d7..b20da9ac 100644
--- a/bot/seasons/halloween/__init__.py
+++ b/bot/seasons/halloween/__init__.py
@@ -1,4 +1,4 @@
-from bot.constants import Colours
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -11,14 +11,9 @@ class Halloween(SeasonBase):
make sure to update this docstring accordingly.
"""
- name = "halloween"
+ season_name = "Halloween"
bot_name = "NeonBot"
- greeting = "Happy Halloween!"
- start_date = "01/10"
- end_date = "01/11"
+ branding_path = "seasonal/halloween"
- colour = Colours.pink
- icon = (
- "/logos/logo_seasonal/hacktober/hacktoberfest.png",
- )
+ months = {Month.october}
diff --git a/bot/seasons/pride/__init__.py b/bot/seasons/pride/__init__.py
index 08df2fa1..6509ac9b 100644
--- a/bot/seasons/pride/__init__.py
+++ b/bot/seasons/pride/__init__.py
@@ -1,4 +1,4 @@
-from bot.constants import Colours
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -21,16 +21,9 @@ class Pride(SeasonBase):
will find you a task and teach you what you need to know.
"""
- name = "pride"
+ season_name = "Pride"
bot_name = "ProudBot"
- greeting = "Happy Pride Month!"
- # Duration of season
- start_date = "01/06"
- end_date = "01/07"
+ branding_path = "seasonal/pride"
- # Season logo
- colour = Colours.soft_red
- icon = (
- "/logos/logo_seasonal/pride/logo_pride.png",
- )
+ months = {Month.june}
diff --git a/bot/seasons/valentines/__init__.py b/bot/seasons/valentines/__init__.py
index 6e5d16f7..fb3d02af 100644
--- a/bot/seasons/valentines/__init__.py
+++ b/bot/seasons/valentines/__init__.py
@@ -1,4 +1,4 @@
-from bot.constants import Colours
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -9,14 +9,9 @@ class Valentines(SeasonBase):
Get yourself into the bot-commands channel and check out the new features!
"""
- name = "valentines"
- bot_name = "Tenderbot"
- greeting = "Get loved-up!"
+ season_name = "Valentines"
+ bot_name = "TenderBot"
- start_date = "01/02"
- end_date = "01/03"
+ branding_path = "seasonal/valentines"
- colour = Colours.pink
- icon = (
- "/logos/logo_seasonal/valentines/loved_up.png",
- )
+ months = {Month.february}
diff --git a/bot/seasons/wildcard/__init__.py b/bot/seasons/wildcard/__init__.py
index 354e979d..48491ce2 100644
--- a/bot/seasons/wildcard/__init__.py
+++ b/bot/seasons/wildcard/__init__.py
@@ -1,3 +1,4 @@
+from bot.constants import Month
from bot.seasons import SeasonBase
@@ -17,15 +18,7 @@ class Wildcard(SeasonBase):
TO THE EVERGREEN FOLDER!
"""
- name = "wildcard"
+ season_name = "Wildcard"
bot_name = "RetroBot"
- # Duration of season
- start_date = "01/08"
- end_date = "01/09"
-
- # Season logo
- bot_icon = "/logos/logo_seasonal/retro_gaming/logo_8bit_indexed_504.png"
- icon = (
- "/logos/logo_seasonal/retro_gaming_animated/logo_spin_plain/logo_spin_plain_504.gif",
- )
+ months = {Month.august}