aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/holidays
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/holidays')
-rw-r--r--bot/exts/holidays/halloween/monstersurvey.py4
-rw-r--r--bot/exts/holidays/pride/pride_anthem.py2
-rw-r--r--bot/exts/holidays/pride/pride_facts.py2
-rw-r--r--bot/exts/holidays/pride/pride_leader.py2
-rw-r--r--bot/exts/holidays/valentines/be_my_valentine.py4
-rw-r--r--bot/exts/holidays/valentines/myvalenstate.py2
6 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/holidays/halloween/monstersurvey.py b/bot/exts/holidays/halloween/monstersurvey.py
index d129f3cc..15770980 100644
--- a/bot/exts/holidays/halloween/monstersurvey.py
+++ b/bot/exts/holidays/halloween/monstersurvey.py
@@ -90,7 +90,7 @@ class MonsterSurvey(Cog):
@monster_group.command(
name="vote"
)
- async def monster_vote(self, ctx: Context, name: str = None) -> None:
+ async def monster_vote(self, ctx: Context, name: str | None = None) -> None:
"""
Cast a vote for a particular monster.
@@ -141,7 +141,7 @@ class MonsterSurvey(Cog):
@monster_group.command(
name="show"
)
- async def monster_show(self, ctx: Context, name: str = None) -> None:
+ async def monster_show(self, ctx: Context, name: str | None = None) -> None:
"""Shows the named monster. If one is not named, it sends the default voting embed instead."""
if name is None:
await ctx.invoke(self.monster_leaderboard)
diff --git a/bot/exts/holidays/pride/pride_anthem.py b/bot/exts/holidays/pride/pride_anthem.py
index c719e388..1f214fc0 100644
--- a/bot/exts/holidays/pride/pride_anthem.py
+++ b/bot/exts/holidays/pride/pride_anthem.py
@@ -32,7 +32,7 @@ class PrideAnthem(commands.Cog):
log.info("No videos for that genre.")
@commands.command(name="prideanthem", aliases=("anthem", "pridesong"))
- async def prideanthem(self, ctx: commands.Context, genre: str = None) -> None:
+ async def prideanthem(self, ctx: commands.Context, genre: str | None = None) -> None:
"""
Sends a message with a video of a random pride anthem.
diff --git a/bot/exts/holidays/pride/pride_facts.py b/bot/exts/holidays/pride/pride_facts.py
index 3d52a3c7..5be1b085 100644
--- a/bot/exts/holidays/pride/pride_facts.py
+++ b/bot/exts/holidays/pride/pride_facts.py
@@ -38,7 +38,7 @@ class PrideFacts(commands.Cog):
return
@commands.command(name="pridefact", aliases=("pridefacts",))
- async def pridefact(self, ctx: commands.Context, option: int | str = None) -> None:
+ async def pridefact(self, ctx: commands.Context, option: int | str | None = None) -> None:
"""
Sends a message with a pride fact of the day.
diff --git a/bot/exts/holidays/pride/pride_leader.py b/bot/exts/holidays/pride/pride_leader.py
index b4a98892..9f01ebf9 100644
--- a/bot/exts/holidays/pride/pride_leader.py
+++ b/bot/exts/holidays/pride/pride_leader.py
@@ -57,7 +57,7 @@ class PrideLeader(commands.Cog):
def embed_builder(self, pride_leader: dict) -> discord.Embed:
"""Generate an Embed with information about a pride leader."""
- name = [name for name, info in PRIDE_RESOURCE.items() if info == pride_leader][0]
+ name = next(name for name, info in PRIDE_RESOURCE.items() if info == pride_leader)
embed = discord.Embed(
title=name,
diff --git a/bot/exts/holidays/valentines/be_my_valentine.py b/bot/exts/holidays/valentines/be_my_valentine.py
index c2dd8bb6..714d3884 100644
--- a/bot/exts/holidays/valentines/be_my_valentine.py
+++ b/bot/exts/holidays/valentines/be_my_valentine.py
@@ -44,7 +44,7 @@ class BeMyValentine(commands.Cog):
@commands.cooldown(1, 1800, commands.BucketType.user)
@commands.group(name="bemyvalentine", invoke_without_command=True)
async def send_valentine(
- self, ctx: commands.Context, user: discord.Member, *, valentine_type: str = None
+ self, ctx: commands.Context, user: discord.Member, *, valentine_type: str | None = None
) -> None:
"""
Send a valentine to a specified user with the lovefest role.
@@ -83,7 +83,7 @@ class BeMyValentine(commands.Cog):
@commands.cooldown(1, 1800, commands.BucketType.user)
@send_valentine.command(name="secret")
async def anonymous(
- self, ctx: commands.Context, user: discord.Member, *, valentine_type: str = None
+ self, ctx: commands.Context, user: discord.Member, *, valentine_type: str | None = None
) -> None:
"""
Send an anonymous Valentine via DM to to a specified user with the lovefest role.
diff --git a/bot/exts/holidays/valentines/myvalenstate.py b/bot/exts/holidays/valentines/myvalenstate.py
index fcef24bc..977b9665 100644
--- a/bot/exts/holidays/valentines/myvalenstate.py
+++ b/bot/exts/holidays/valentines/myvalenstate.py
@@ -39,7 +39,7 @@ class MyValenstate(commands.Cog):
return pre_row[-1]
@commands.command()
- async def myvalenstate(self, ctx: commands.Context, *, name: str = None) -> None:
+ async def myvalenstate(self, ctx: commands.Context, *, name: str | None = None) -> None:
"""Find the vacation spot(s) with the most matching characters to the invoking user."""
eq_chars = collections.defaultdict(int)
if name is None: