diff options
| -rw-r--r-- | bot/constants.py | 24 | ||||
| -rw-r--r-- | bot/exts/christmas/adventofcode.py | 2 | ||||
| -rw-r--r-- | bot/exts/christmas/hanukkah_embed.py | 2 | ||||
| -rw-r--r-- | bot/exts/easter/egg_facts.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/candy_collection.py | 6 | ||||
| -rw-r--r-- | bot/exts/halloween/hacktober-issue-finder.py | 2 | ||||
| -rw-r--r-- | bot/exts/halloween/hacktoberstats.py | 6 | ||||
| -rw-r--r-- | bot/exts/halloween/spookyreact.py | 2 | ||||
| -rw-r--r-- | bot/exts/pride/pride_facts.py | 2 | ||||
| -rw-r--r-- | bot/exts/valentines/be_my_valentine.py | 2 | ||||
| -rw-r--r-- | bot/seasons.py | 12 |
11 files changed, 31 insertions, 31 deletions
diff --git a/bot/constants.py b/bot/constants.py index ab16be5d..34bbf87f 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -136,18 +136,18 @@ class Lovefest: class Month(enum.IntEnum): - january = 1 - february = 2 - march = 3 - april = 4 - may = 5 - june = 6 - july = 7 - august = 8 - september = 9 - october = 10 - november = 11 - december = 12 + JANUARY = 1 + FEBRUARY = 2 + MARCH = 3 + APRIL = 4 + MAY = 5 + JUNE = 6 + JULY = 7 + AUGUST = 8 + SEPTEMBER = 9 + OCTOBER = 10 + NOVEMBER = 11 + DECEMBER = 12 # If a month override was configured, check that it's a valid Month diff --git a/bot/exts/christmas/adventofcode.py b/bot/exts/christmas/adventofcode.py index 8f7aa13b..cc3923c8 100644 --- a/bot/exts/christmas/adventofcode.py +++ b/bot/exts/christmas/adventofcode.py @@ -153,7 +153,7 @@ class AdventOfCode(commands.Cog): status_coro = countdown_status(self.bot) self.status_task = self.bot.loop.create_task(status_coro) - @in_month(Month.december) + @in_month(Month.DECEMBER) @commands.group(name="adventofcode", aliases=("aoc",)) @override_in_channel(AOC_WHITELIST) async def adventofcode_group(self, ctx: commands.Context) -> None: diff --git a/bot/exts/christmas/hanukkah_embed.py b/bot/exts/christmas/hanukkah_embed.py index 718ca32a..4f470a34 100644 --- a/bot/exts/christmas/hanukkah_embed.py +++ b/bot/exts/christmas/hanukkah_embed.py @@ -34,7 +34,7 @@ class HanukkahEmbed(commands.Cog): hanukkah_dates.append(date) return hanukkah_dates - @in_month(Month.december) + @in_month(Month.DECEMBER) @commands.command(name='hanukkah', aliases=['chanukah']) async def hanukkah_festival(self, ctx: commands.Context) -> None: """Tells you about the Hanukkah Festivaltime of festival, festival day, etc).""" diff --git a/bot/exts/easter/egg_facts.py b/bot/exts/easter/egg_facts.py index bc64d26e..83918fb0 100644 --- a/bot/exts/easter/egg_facts.py +++ b/bot/exts/easter/egg_facts.py @@ -32,7 +32,7 @@ class EasterFacts(commands.Cog): with p.open(encoding="utf8") as f: return load(f) - @seasonal_task(Month.april) + @seasonal_task(Month.APRIL) async def send_egg_fact_daily(self) -> None: """A background task that sends an easter egg fact in the event channel everyday.""" await self.bot.wait_until_ready() diff --git a/bot/exts/halloween/candy_collection.py b/bot/exts/halloween/candy_collection.py index 00061fc2..90c29eb2 100644 --- a/bot/exts/halloween/candy_collection.py +++ b/bot/exts/halloween/candy_collection.py @@ -35,7 +35,7 @@ class CandyCollection(commands.Cog): userid = userinfo['userid'] self.get_candyinfo[userid] = userinfo - @in_month(Month.october) + @in_month(Month.OCTOBER) @commands.Cog.listener() async def on_message(self, message: discord.Message) -> None: """Randomly adds candy or skull reaction to non-bot messages in the Event channel.""" @@ -57,7 +57,7 @@ class CandyCollection(commands.Cog): self.msg_reacted.append(d) return await message.add_reaction('\N{CANDY}') - @in_month(Month.october) + @in_month(Month.OCTOBER) @commands.Cog.listener() async def on_reaction_add(self, reaction: discord.Reaction, user: discord.Member) -> None: """Add/remove candies from a person if the reaction satisfies criteria.""" @@ -181,7 +181,7 @@ class CandyCollection(commands.Cog): with open(json_location, 'w') as outfile: json.dump(self.candy_json, outfile) - @in_month(Month.october) + @in_month(Month.OCTOBER) @commands.command() async def candy(self, ctx: commands.Context) -> None: """Get the candy leaderboard and save to JSON.""" diff --git a/bot/exts/halloween/hacktober-issue-finder.py b/bot/exts/halloween/hacktober-issue-finder.py index 3a9d38d2..b5ad1c4f 100644 --- a/bot/exts/halloween/hacktober-issue-finder.py +++ b/bot/exts/halloween/hacktober-issue-finder.py @@ -26,7 +26,7 @@ class HacktoberIssues(commands.Cog): self.cache_beginner = None self.cache_timer_beginner = datetime.datetime(1, 1, 1) - @in_month(Month.october) + @in_month(Month.OCTOBER) @commands.command() async def hacktoberissues(self, ctx: commands.Context, option: str = "") -> None: """ diff --git a/bot/exts/halloween/hacktoberstats.py b/bot/exts/halloween/hacktoberstats.py index 0c1c837c..e01ee50c 100644 --- a/bot/exts/halloween/hacktoberstats.py +++ b/bot/exts/halloween/hacktoberstats.py @@ -29,7 +29,7 @@ class HacktoberStats(commands.Cog): self.link_json = make_persistent(Path("bot", "resources", "halloween", "github_links.json")) self.linked_accounts = self.load_linked_users() - @in_month(Month.october) + @in_month(Month.OCTOBER) @commands.group(name="hacktoberstats", aliases=("hackstats",), invoke_without_command=True) @override_in_channel(HACKTOBER_WHITELIST) async def hacktoberstats_group(self, ctx: commands.Context, github_username: str = None) -> None: @@ -57,7 +57,7 @@ class HacktoberStats(commands.Cog): await self.get_stats(ctx, github_username) - @in_month(Month.october) + @in_month(Month.OCTOBER) @hacktoberstats_group.command(name="link") @override_in_channel(HACKTOBER_WHITELIST) async def link_user(self, ctx: commands.Context, github_username: str = None) -> None: @@ -92,7 +92,7 @@ class HacktoberStats(commands.Cog): logging.info(f"{author_id} tried to link a GitHub account but didn't provide a username") await ctx.send(f"{author_mention}, a GitHub username is required to link your account") - @in_month(Month.october) + @in_month(Month.OCTOBER) @hacktoberstats_group.command(name="unlink") @override_in_channel(HACKTOBER_WHITELIST) async def unlink_user(self, ctx: commands.Context) -> None: diff --git a/bot/exts/halloween/spookyreact.py b/bot/exts/halloween/spookyreact.py index a3896cfb..e5945aea 100644 --- a/bot/exts/halloween/spookyreact.py +++ b/bot/exts/halloween/spookyreact.py @@ -26,7 +26,7 @@ class SpookyReact(Cog): def __init__(self, bot: Bot): self.bot = bot - @in_month(Month.october) + @in_month(Month.OCTOBER) @Cog.listener() async def on_message(self, ctx: discord.Message) -> None: """ diff --git a/bot/exts/pride/pride_facts.py b/bot/exts/pride/pride_facts.py index bd9c087b..f759dcb1 100644 --- a/bot/exts/pride/pride_facts.py +++ b/bot/exts/pride/pride_facts.py @@ -32,7 +32,7 @@ class PrideFacts(commands.Cog): with open(Path("bot/resources/pride/facts.json"), "r", encoding="utf-8") as f: return json.load(f) - @seasonal_task(Month.june) + @seasonal_task(Month.JUNE) async def send_pride_fact_daily(self) -> None: """Background task to post the daily pride fact every day.""" await self.bot.wait_until_ready() diff --git a/bot/exts/valentines/be_my_valentine.py b/bot/exts/valentines/be_my_valentine.py index 4b0818da..e5e71d25 100644 --- a/bot/exts/valentines/be_my_valentine.py +++ b/bot/exts/valentines/be_my_valentine.py @@ -31,7 +31,7 @@ class BeMyValentine(commands.Cog): valentines = load(json_data) return valentines - @in_month(Month.february) + @in_month(Month.FEBRUARY) @commands.group(name="lovefest") async def lovefest_role(self, ctx: commands.Context) -> None: """ diff --git a/bot/seasons.py b/bot/seasons.py index 1376d50b..30979d2a 100644 --- a/bot/seasons.py +++ b/bot/seasons.py @@ -43,7 +43,7 @@ class Christmas(SeasonBase): branding_path = "seasonal/christmas" - months = {Month.december} + months = {Month.DECEMBER} class Easter(SeasonBase): @@ -60,7 +60,7 @@ class Easter(SeasonBase): branding_path = "seasonal/easter" - months = {Month.april} + months = {Month.APRIL} class Halloween(SeasonBase): @@ -74,7 +74,7 @@ class Halloween(SeasonBase): branding_path = "seasonal/halloween" - months = {Month.october} + months = {Month.OCTOBER} class Pride(SeasonBase): @@ -94,7 +94,7 @@ class Pride(SeasonBase): branding_path = "seasonal/pride" - months = {Month.june} + months = {Month.JUNE} class Valentines(SeasonBase): @@ -108,7 +108,7 @@ class Valentines(SeasonBase): branding_path = "seasonal/valentines" - months = {Month.february} + months = {Month.FEBRUARY} class Wildcard(SeasonBase): @@ -120,7 +120,7 @@ class Wildcard(SeasonBase): colour = Colours.purple description = "A season full of surprises!" - months = {Month.august} + months = {Month.AUGUST} def get_all_seasons() -> t.List[t.Type[SeasonBase]]: |