aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/easter
diff options
context:
space:
mode:
Diffstat (limited to 'bot/exts/easter')
-rw-r--r--bot/exts/easter/april_fools_vids.py2
-rw-r--r--bot/exts/easter/bunny_name_generator.py16
-rw-r--r--bot/exts/easter/earth_photos.py2
-rw-r--r--bot/exts/easter/egg_facts.py2
-rw-r--r--bot/exts/easter/egghead_quiz.py12
-rw-r--r--bot/exts/easter/save_the_planet.py4
-rw-r--r--bot/exts/easter/traditions.py2
7 files changed, 20 insertions, 20 deletions
diff --git a/bot/exts/easter/april_fools_vids.py b/bot/exts/easter/april_fools_vids.py
index 84aa2913..3ce1f72a 100644
--- a/bot/exts/easter/april_fools_vids.py
+++ b/bot/exts/easter/april_fools_vids.py
@@ -15,7 +15,7 @@ with open("bot/resources/easter/april_fools_vids.json", encoding="utf-8") as f:
class AprilFoolVideos(commands.Cog):
"""A cog for April Fools' that gets a random April Fools' video from Youtube."""
- @commands.command(name='fool')
+ @commands.command(name="fool")
async def april_fools(self, ctx: commands.Context) -> None:
"""Get a random April Fools' video from Youtube."""
video = random.choice(ALL_VIDS)
diff --git a/bot/exts/easter/bunny_name_generator.py b/bot/exts/easter/bunny_name_generator.py
index 6d9e2a57..23f85226 100644
--- a/bot/exts/easter/bunny_name_generator.py
+++ b/bot/exts/easter/bunny_name_generator.py
@@ -20,7 +20,7 @@ class BunnyNameGenerator(commands.Cog):
def find_separators(self, displayname: str) -> Union[List[str], None]:
"""Check if Discord name contains spaces so we can bunnify an individual word in the name."""
- new_name = re.split(r'[_.\s]', displayname)
+ new_name = re.split(r"[_.\s]", displayname)
if displayname not in new_name:
return new_name
@@ -33,11 +33,11 @@ class BunnyNameGenerator(commands.Cog):
Only the most recently matched pattern will apply the changes.
"""
expressions = [
- (r'a.+y', 'patchy'),
- (r'e.+y', 'ears'),
- (r'i.+y', 'ditsy'),
- (r'o.+y', 'oofy'),
- (r'u.+y', 'uffy'),
+ ("a.+y", "patchy"),
+ ("e.+y", "ears"),
+ ("i.+y", "ditsy"),
+ ("o.+y", "oofy"),
+ ("u.+y", "uffy"),
]
for exp, vowel_sub in expressions:
@@ -47,7 +47,7 @@ class BunnyNameGenerator(commands.Cog):
def append_name(self, displayname: str) -> str:
"""Adds a suffix to the end of the Discord name."""
- extensions = ['foot', 'ear', 'nose', 'tail']
+ extensions = ["foot", "ear", "nose", "tail"]
suffix = random.choice(extensions)
appended_name = displayname + suffix
@@ -74,7 +74,7 @@ class BunnyNameGenerator(commands.Cog):
unmatched_name = self.append_name(username)
if spaces_in_name is not None:
- replacements = ['Cotton', 'Fluff', 'Floof' 'Bounce', 'Snuffle', 'Nibble', 'Cuddle', 'Velvetpaw', 'Carrot']
+ replacements = ["Cotton", "Fluff", "Floof" "Bounce", "Snuffle", "Nibble", "Cuddle", "Velvetpaw", "Carrot"]
word_to_replace = random.choice(spaces_in_name)
substitute = random.choice(replacements)
bunnified_name = username.replace(word_to_replace, substitute)
diff --git a/bot/exts/easter/earth_photos.py b/bot/exts/easter/earth_photos.py
index d7e7ccc3..0e82e99a 100644
--- a/bot/exts/easter/earth_photos.py
+++ b/bot/exts/easter/earth_photos.py
@@ -21,7 +21,7 @@ class EarthPhotos(commands.Cog):
"""Returns a random photo of earth, sourced from Unsplash."""
async with ctx.typing():
async with self.bot.http_session.get(
- 'https://api.unsplash.com/photos/random',
+ "https://api.unsplash.com/photos/random",
params={"query": "planet_earth", "client_id": Tokens.unsplash_access_key}
) as r:
jsondata = await r.json()
diff --git a/bot/exts/easter/egg_facts.py b/bot/exts/easter/egg_facts.py
index 78a5e592..8c93ca7b 100644
--- a/bot/exts/easter/egg_facts.py
+++ b/bot/exts/easter/egg_facts.py
@@ -41,7 +41,7 @@ class EasterFacts(commands.Cog):
channel = self.bot.get_channel(Channels.community_bot_commands)
await channel.send(embed=self.make_embed())
- @commands.command(name='eggfact', aliases=['fact'])
+ @commands.command(name="eggfact", aliases=["fact"])
async def easter_facts(self, ctx: commands.Context) -> None:
"""Get easter egg facts."""
embed = self.make_embed()
diff --git a/bot/exts/easter/egghead_quiz.py b/bot/exts/easter/egghead_quiz.py
index e950bc2e..59c1f6f8 100644
--- a/bot/exts/easter/egghead_quiz.py
+++ b/bot/exts/easter/egghead_quiz.py
@@ -18,12 +18,12 @@ with open(Path("bot/resources/easter/egghead_questions.json"), "r", encoding="ut
EMOJIS = [
- '\U0001f1e6', '\U0001f1e7', '\U0001f1e8', '\U0001f1e9', '\U0001f1ea',
- '\U0001f1eb', '\U0001f1ec', '\U0001f1ed', '\U0001f1ee', '\U0001f1ef',
- '\U0001f1f0', '\U0001f1f1', '\U0001f1f2', '\U0001f1f3', '\U0001f1f4',
- '\U0001f1f5', '\U0001f1f6', '\U0001f1f7', '\U0001f1f8', '\U0001f1f9',
- '\U0001f1fa', '\U0001f1fb', '\U0001f1fc', '\U0001f1fd', '\U0001f1fe',
- '\U0001f1ff'
+ "\U0001f1e6", "\U0001f1e7", "\U0001f1e8", "\U0001f1e9", "\U0001f1ea",
+ "\U0001f1eb", "\U0001f1ec", "\U0001f1ed", "\U0001f1ee", "\U0001f1ef",
+ "\U0001f1f0", "\U0001f1f1", "\U0001f1f2", "\U0001f1f3", "\U0001f1f4",
+ "\U0001f1f5", "\U0001f1f6", "\U0001f1f7", "\U0001f1f8", "\U0001f1f9",
+ "\U0001f1fa", "\U0001f1fb", "\U0001f1fc", "\U0001f1fd", "\U0001f1fe",
+ "\U0001f1ff"
] # Regional Indicators A-Z (used for voting)
TIMELIMIT = 30
diff --git a/bot/exts/easter/save_the_planet.py b/bot/exts/easter/save_the_planet.py
index db9d3498..444bb030 100644
--- a/bot/exts/easter/save_the_planet.py
+++ b/bot/exts/easter/save_the_planet.py
@@ -8,14 +8,14 @@ from bot.bot import Bot
from bot.utils.randomization import RandomCycle
-with Path("bot/resources/easter/save_the_planet.json").open('r', encoding='utf8') as f:
+with Path("bot/resources/easter/save_the_planet.json").open("r", encoding="utf8") as f:
EMBED_DATA = RandomCycle(json.load(f))
class SaveThePlanet(commands.Cog):
"""A cog that teaches users how they can help our planet."""
- @commands.command(aliases=('savetheearth', 'saveplanet', 'saveearth'))
+ @commands.command(aliases=("savetheearth", "saveplanet", "saveearth"))
async def savetheplanet(self, ctx: commands.Context) -> None:
"""Responds with a random tip on how to be eco-friendly and help our planet."""
return_embed = Embed.from_dict(next(EMBED_DATA))
diff --git a/bot/exts/easter/traditions.py b/bot/exts/easter/traditions.py
index 19e69b98..cb70f2d0 100644
--- a/bot/exts/easter/traditions.py
+++ b/bot/exts/easter/traditions.py
@@ -16,7 +16,7 @@ with open(Path("bot/resources/easter/traditions.json"), "r", encoding="utf8") as
class Traditions(commands.Cog):
"""A cog which allows users to get a random easter tradition or custom from a random country."""
- @commands.command(aliases=('eastercustoms',))
+ @commands.command(aliases=("eastercustoms",))
async def easter_tradition(self, ctx: commands.Context) -> None:
"""Responds with a random tradition or custom."""
random_country = random.choice(list(traditions))