aboutsummaryrefslogtreecommitdiffstats
path: root/bot/seasons/easter
diff options
context:
space:
mode:
Diffstat (limited to 'bot/seasons/easter')
-rw-r--r--bot/seasons/easter/avatar_easterifier.py2
-rw-r--r--bot/seasons/easter/bunny_name_generator.py6
-rw-r--r--bot/seasons/easter/easter_riddle.py2
-rw-r--r--bot/seasons/easter/egghead_quiz.py4
-rw-r--r--bot/seasons/easter/traditions.py2
5 files changed, 8 insertions, 8 deletions
diff --git a/bot/seasons/easter/avatar_easterifier.py b/bot/seasons/easter/avatar_easterifier.py
index f056068e..85c32909 100644
--- a/bot/seasons/easter/avatar_easterifier.py
+++ b/bot/seasons/easter/avatar_easterifier.py
@@ -34,7 +34,7 @@ class AvatarEasterifier(commands.Cog):
r1, g1, b1 = x
def distance(point: Tuple[int, int, int]) -> Tuple[int, int, int]:
- """Finds the difference between a pastel colour and the original pixel colour"""
+ """Finds the difference between a pastel colour and the original pixel colour."""
r2, g2, b2 = point
return ((r1 - r2)**2 + (g1 - g2)**2 + (b1 - b2)**2)
diff --git a/bot/seasons/easter/bunny_name_generator.py b/bot/seasons/easter/bunny_name_generator.py
index 22957b7f..97c467e1 100644
--- a/bot/seasons/easter/bunny_name_generator.py
+++ b/bot/seasons/easter/bunny_name_generator.py
@@ -47,7 +47,7 @@ class BunnyNameGenerator(commands.Cog):
return new_name
def append_name(self, displayname: str) -> str:
- """Adds a suffix to the end of the Discord name"""
+ """Adds a suffix to the end of the Discord name."""
extensions = ['foot', 'ear', 'nose', 'tail']
suffix = random.choice(extensions)
appended_name = displayname + suffix
@@ -56,12 +56,12 @@ class BunnyNameGenerator(commands.Cog):
@commands.command()
async def bunnyname(self, ctx: commands.Context) -> None:
- """Picks a random bunny name from a JSON file"""
+ """Picks a random bunny name from a JSON file."""
await ctx.send(random.choice(BUNNY_NAMES["names"]))
@commands.command()
async def bunnifyme(self, ctx: commands.Context) -> None:
- """Gets your Discord username and bunnifies it"""
+ """Gets your Discord username and bunnifies it."""
username = ctx.message.author.display_name
# If name contains spaces or other separators, get the individual words to randomly bunnify
diff --git a/bot/seasons/easter/easter_riddle.py b/bot/seasons/easter/easter_riddle.py
index c3f19055..4b98b204 100644
--- a/bot/seasons/easter/easter_riddle.py
+++ b/bot/seasons/easter/easter_riddle.py
@@ -84,7 +84,7 @@ class EasterRiddle(commands.Cog):
@commands.Cog.listener()
async def on_message(self, message: discord.Messaged) -> None:
- """If a non-bot user enters a correct answer, their username gets added to self.winners"""
+ """If a non-bot user enters a correct answer, their username gets added to self.winners."""
if self.current_channel != message.channel:
return
diff --git a/bot/seasons/easter/egghead_quiz.py b/bot/seasons/easter/egghead_quiz.py
index 0b175bf1..bd179fe2 100644
--- a/bot/seasons/easter/egghead_quiz.py
+++ b/bot/seasons/easter/egghead_quiz.py
@@ -97,13 +97,13 @@ class EggheadQuiz(commands.Cog):
@staticmethod
async def already_reacted(message: discord.Message, user: Union[discord.Member, discord.User]) -> bool:
- """Returns whether a given user has reacted more than once to a given message"""
+ """Returns whether a given user has reacted more than once to a given message."""
users = [u.id for reaction in [await r.users().flatten() for r in message.reactions] for u in reaction]
return users.count(user.id) > 1 # Old reaction plus new reaction
@commands.Cog.listener()
async def on_reaction_add(self, reaction: discord.Reaction, user: Union[discord.Member, discord.User]) -> None:
- """Listener to listen specifically for reactions of quiz messages"""
+ """Listener to listen specifically for reactions of quiz messages."""
if user.bot:
return
if reaction.message.id not in self.quiz_messages:
diff --git a/bot/seasons/easter/traditions.py b/bot/seasons/easter/traditions.py
index 4fb4694f..9529823f 100644
--- a/bot/seasons/easter/traditions.py
+++ b/bot/seasons/easter/traditions.py
@@ -19,7 +19,7 @@ class Traditions(commands.Cog):
@commands.command(aliases=('eastercustoms',))
async def easter_tradition(self, ctx: commands.Context) -> None:
- """Responds with a random tradition or custom"""
+ """Responds with a random tradition or custom."""
random_country = random.choice(list(traditions))
await ctx.send(f"{random_country}:\n{traditions[random_country]}")