aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/holidays/halloween/candy_collection.py
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/holidays/halloween/candy_collection.py')
-rw-r--r--bot/exts/holidays/halloween/candy_collection.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/bot/exts/holidays/halloween/candy_collection.py b/bot/exts/holidays/halloween/candy_collection.py
index 683114f9..ca68888b 100644
--- a/bot/exts/holidays/halloween/candy_collection.py
+++ b/bot/exts/holidays/halloween/candy_collection.py
@@ -1,6 +1,5 @@
import logging
import random
-from typing import Union
import discord
from async_rediscache import RedisCache
@@ -18,17 +17,17 @@ ADD_CANDY_EXISTING_REACTION_CHANCE = 10 # 10%
ADD_SKULL_REACTION_CHANCE = 50 # 2%
ADD_SKULL_EXISTING_REACTION_CHANCE = 20 # 5%
-EMOJIS = dict(
- CANDY="\N{CANDY}",
- SKULL="\N{SKULL}",
- MEDALS=(
+EMOJIS = {
+ "CANDY": "\N{CANDY}",
+ "SKULL": "\N{SKULL}",
+ "MEDALS": (
"\N{FIRST PLACE MEDAL}",
"\N{SECOND PLACE MEDAL}",
"\N{THIRD PLACE MEDAL}",
"\N{SPORTS MEDAL}",
"\N{SPORTS MEDAL}",
),
-)
+}
class CandyCollection(commands.Cog):
@@ -69,7 +68,7 @@ class CandyCollection(commands.Cog):
@in_month(Month.OCTOBER)
@commands.Cog.listener()
- async def on_reaction_add(self, reaction: discord.Reaction, user: Union[discord.User, discord.Member]) -> None:
+ async def on_reaction_add(self, reaction: discord.Reaction, user: discord.User | discord.Member) -> None:
"""Add/remove candies from a person if the reaction satisfies criteria."""
message = reaction.message
# check to ensure the reactor is human
@@ -140,7 +139,7 @@ class CandyCollection(commands.Cog):
@staticmethod
async def send_spook_msg(
- author: discord.Member, channel: discord.TextChannel, candies: Union[str, int]
+ author: discord.Member, channel: discord.TextChannel, candies: str | int
) -> None:
"""Send a spooky message."""
e = discord.Embed(colour=author.colour)