aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2022-08-23 21:38:49 +0100
committerGravatar Chris Lovering <[email protected]>2022-09-21 23:02:56 +0100
commit2993a3e13bf1eb939bf4ac451ffe19b64a30709a (patch)
tree4b76184d5e7d38132f8a80fbbc859c5c738dc65e
parentUpdate redis init due to new redis-py upgrade (diff)
Support discord.py's new async cog loading
-rw-r--r--bot/exts/avatar_modification/avatar_modify.py4
-rw-r--r--bot/exts/core/error_handler.py4
-rw-r--r--bot/exts/core/extensions.py4
-rw-r--r--bot/exts/core/help.py4
-rw-r--r--bot/exts/core/internal_eval/__init__.py4
-rw-r--r--bot/exts/core/ping.py4
-rw-r--r--bot/exts/core/source.py4
-rw-r--r--bot/exts/events/advent_of_code/__init__.py4
-rw-r--r--bot/exts/events/hacktoberfest/hacktober-issue-finder.py4
-rw-r--r--bot/exts/events/hacktoberfest/hacktoberstats.py4
-rw-r--r--bot/exts/events/hacktoberfest/timeleft.py4
-rw-r--r--bot/exts/events/trivianight/_questions.py2
-rw-r--r--bot/exts/events/trivianight/trivianight.py4
-rw-r--r--bot/exts/fun/anagram.py4
-rw-r--r--bot/exts/fun/battleship.py4
-rw-r--r--bot/exts/fun/catify.py4
-rw-r--r--bot/exts/fun/coinflip.py4
-rw-r--r--bot/exts/fun/connect_four.py4
-rw-r--r--bot/exts/fun/duck_game.py4
-rw-r--r--bot/exts/fun/fun.py4
-rw-r--r--bot/exts/fun/game.py4
-rw-r--r--bot/exts/fun/hangman.py4
-rw-r--r--bot/exts/fun/latex.py4
-rw-r--r--bot/exts/fun/madlibs.py4
-rw-r--r--bot/exts/fun/magic_8ball.py4
-rw-r--r--bot/exts/fun/minesweeper.py4
-rw-r--r--bot/exts/fun/movie.py4
-rw-r--r--bot/exts/fun/quack.py4
-rw-r--r--bot/exts/fun/recommend_game.py4
-rw-r--r--bot/exts/fun/rps.py4
-rw-r--r--bot/exts/fun/snakes/__init__.py4
-rw-r--r--bot/exts/fun/space.py4
-rw-r--r--bot/exts/fun/speedrun.py4
-rw-r--r--bot/exts/fun/status_codes.py4
-rw-r--r--bot/exts/fun/tic_tac_toe.py4
-rw-r--r--bot/exts/fun/trivia_quiz.py6
-rw-r--r--bot/exts/fun/uwu.py4
-rw-r--r--bot/exts/fun/wonder_twins.py4
-rw-r--r--bot/exts/fun/xkcd.py4
-rw-r--r--bot/exts/holidays/earth_day/save_the_planet.py4
-rw-r--r--bot/exts/holidays/easter/april_fools_vids.py4
-rw-r--r--bot/exts/holidays/easter/bunny_name_generator.py4
-rw-r--r--bot/exts/holidays/easter/earth_photos.py4
-rw-r--r--bot/exts/holidays/easter/easter_riddle.py4
-rw-r--r--bot/exts/holidays/easter/egg_decorating.py4
-rw-r--r--bot/exts/holidays/easter/egg_facts.py4
-rw-r--r--bot/exts/holidays/easter/egghead_quiz.py4
-rw-r--r--bot/exts/holidays/easter/traditions.py4
-rw-r--r--bot/exts/holidays/halloween/8ball.py4
-rw-r--r--bot/exts/holidays/halloween/candy_collection.py4
-rw-r--r--bot/exts/holidays/halloween/halloween_facts.py4
-rw-r--r--bot/exts/holidays/halloween/halloweenify.py4
-rw-r--r--bot/exts/holidays/halloween/monsterbio.py4
-rw-r--r--bot/exts/holidays/halloween/monstersurvey.py4
-rw-r--r--bot/exts/holidays/halloween/scarymovie.py4
-rw-r--r--bot/exts/holidays/halloween/spookygif.py4
-rw-r--r--bot/exts/holidays/halloween/spookynamerate.py4
-rw-r--r--bot/exts/holidays/halloween/spookyrating.py4
-rw-r--r--bot/exts/holidays/halloween/spookyreact.py4
-rw-r--r--bot/exts/holidays/hanukkah/hanukkah_embed.py4
-rw-r--r--bot/exts/holidays/pride/drag_queen_name.py4
-rw-r--r--bot/exts/holidays/pride/pride_anthem.py4
-rw-r--r--bot/exts/holidays/pride/pride_facts.py4
-rw-r--r--bot/exts/holidays/pride/pride_leader.py4
-rw-r--r--bot/exts/holidays/valentines/be_my_valentine.py4
-rw-r--r--bot/exts/holidays/valentines/lovecalculator.py4
-rw-r--r--bot/exts/holidays/valentines/movie_generator.py4
-rw-r--r--bot/exts/holidays/valentines/myvalenstate.py4
-rw-r--r--bot/exts/holidays/valentines/pickuplines.py4
-rw-r--r--bot/exts/holidays/valentines/savethedate.py4
-rw-r--r--bot/exts/holidays/valentines/valentine_zodiac.py4
-rw-r--r--bot/exts/holidays/valentines/whoisvalentine.py4
-rw-r--r--bot/exts/utilities/bookmark.py4
-rw-r--r--bot/exts/utilities/challenges.py4
-rw-r--r--bot/exts/utilities/cheatsheet.py4
-rw-r--r--bot/exts/utilities/colour.py4
-rw-r--r--bot/exts/utilities/conversationstarters.py4
-rw-r--r--bot/exts/utilities/emoji.py4
-rw-r--r--bot/exts/utilities/epoch.py4
-rw-r--r--bot/exts/utilities/githubinfo.py4
-rw-r--r--bot/exts/utilities/pythonfacts.py4
-rw-r--r--bot/exts/utilities/realpython.py4
-rw-r--r--bot/exts/utilities/reddit.py4
-rw-r--r--bot/exts/utilities/stackoverflow.py4
-rw-r--r--bot/exts/utilities/timed.py4
-rw-r--r--bot/exts/utilities/twemoji.py4
-rw-r--r--bot/exts/utilities/wikipedia.py4
-rw-r--r--bot/exts/utilities/wolfram.py4
-rw-r--r--bot/exts/utilities/wtf_python.py6
89 files changed, 179 insertions, 179 deletions
diff --git a/bot/exts/avatar_modification/avatar_modify.py b/bot/exts/avatar_modification/avatar_modify.py
index 337f510c..6d1f26f6 100644
--- a/bot/exts/avatar_modification/avatar_modify.py
+++ b/bot/exts/avatar_modification/avatar_modify.py
@@ -366,6 +366,6 @@ class AvatarModify(commands.Cog):
await ctx.send(file=file, embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the AvatarModify cog."""
- bot.add_cog(AvatarModify(bot))
+ await bot.add_cog(AvatarModify(bot))
diff --git a/bot/exts/core/error_handler.py b/bot/exts/core/error_handler.py
index 372b82d2..f62b3d4e 100644
--- a/bot/exts/core/error_handler.py
+++ b/bot/exts/core/error_handler.py
@@ -186,6 +186,6 @@ class CommandErrorHandler(commands.Cog):
await ctx.send(embed=e, delete_after=RedirectOutput.delete_delay)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the ErrorHandler cog."""
- bot.add_cog(CommandErrorHandler(bot))
+ await bot.add_cog(CommandErrorHandler(bot))
diff --git a/bot/exts/core/extensions.py b/bot/exts/core/extensions.py
index 586222c8..2c9b7255 100644
--- a/bot/exts/core/extensions.py
+++ b/bot/exts/core/extensions.py
@@ -261,6 +261,6 @@ class Extensions(commands.Cog):
error.handled = True
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Extensions cog."""
- bot.add_cog(Extensions(bot))
+ await bot.add_cog(Extensions(bot))
diff --git a/bot/exts/core/help.py b/bot/exts/core/help.py
index eb7a9762..fa9c2e03 100644
--- a/bot/exts/core/help.py
+++ b/bot/exts/core/help.py
@@ -547,7 +547,7 @@ def unload(bot: Bot) -> None:
bot.add_command(bot._old_help)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""
The setup for the help extension.
@@ -562,7 +562,7 @@ def setup(bot: Bot) -> None:
bot.remove_command("help")
try:
- bot.add_cog(Help())
+ await bot.add_cog(Help())
except Exception:
unload(bot)
raise
diff --git a/bot/exts/core/internal_eval/__init__.py b/bot/exts/core/internal_eval/__init__.py
index 695fa74d..258f7fd8 100644
--- a/bot/exts/core/internal_eval/__init__.py
+++ b/bot/exts/core/internal_eval/__init__.py
@@ -1,10 +1,10 @@
from bot.bot import Bot
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Set up the Internal Eval extension."""
# Import the Cog at runtime to prevent side effects like defining
# RedisCache instances too early.
from ._internal_eval import InternalEval
- bot.add_cog(InternalEval(bot))
+ await bot.add_cog(InternalEval(bot))
diff --git a/bot/exts/core/ping.py b/bot/exts/core/ping.py
index 6be78117..cb32398e 100644
--- a/bot/exts/core/ping.py
+++ b/bot/exts/core/ping.py
@@ -40,6 +40,6 @@ class Ping(commands.Cog):
await ctx.send(f"I started up {uptime_string}.")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Ping cog."""
- bot.add_cog(Ping(bot))
+ await bot.add_cog(Ping(bot))
diff --git a/bot/exts/core/source.py b/bot/exts/core/source.py
index 2801be0f..f771eaca 100644
--- a/bot/exts/core/source.py
+++ b/bot/exts/core/source.py
@@ -82,6 +82,6 @@ class BotSource(commands.Cog):
return embed
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the BotSource cog."""
- bot.add_cog(BotSource())
+ await bot.add_cog(BotSource())
diff --git a/bot/exts/events/advent_of_code/__init__.py b/bot/exts/events/advent_of_code/__init__.py
index 3c521168..33c3971a 100644
--- a/bot/exts/events/advent_of_code/__init__.py
+++ b/bot/exts/events/advent_of_code/__init__.py
@@ -1,10 +1,10 @@
from bot.bot import Bot
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Set up the Advent of Code extension."""
# Import the Cog at runtime to prevent side effects like defining
# RedisCache instances too early.
from ._cog import AdventOfCode
- bot.add_cog(AdventOfCode(bot))
+ await bot.add_cog(AdventOfCode(bot))
diff --git a/bot/exts/events/hacktoberfest/hacktober-issue-finder.py b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
index 1774564b..8be985f9 100644
--- a/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
+++ b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
@@ -113,6 +113,6 @@ class HacktoberIssues(commands.Cog):
return embed
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the HacktoberIssue finder."""
- bot.add_cog(HacktoberIssues(bot))
+ await bot.add_cog(HacktoberIssues(bot))
diff --git a/bot/exts/events/hacktoberfest/hacktoberstats.py b/bot/exts/events/hacktoberfest/hacktoberstats.py
index 72067dbe..c29e24b0 100644
--- a/bot/exts/events/hacktoberfest/hacktoberstats.py
+++ b/bot/exts/events/hacktoberfest/hacktoberstats.py
@@ -432,6 +432,6 @@ class HacktoberStats(commands.Cog):
return author_id, author_mention
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Hacktober Stats Cog."""
- bot.add_cog(HacktoberStats(bot))
+ await bot.add_cog(HacktoberStats(bot))
diff --git a/bot/exts/events/hacktoberfest/timeleft.py b/bot/exts/events/hacktoberfest/timeleft.py
index 55109599..f470e932 100644
--- a/bot/exts/events/hacktoberfest/timeleft.py
+++ b/bot/exts/events/hacktoberfest/timeleft.py
@@ -62,6 +62,6 @@ class TimeLeft(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Time Left Cog."""
- bot.add_cog(TimeLeft())
+ await bot.add_cog(TimeLeft())
diff --git a/bot/exts/events/trivianight/_questions.py b/bot/exts/events/trivianight/_questions.py
index d6beced9..5f1046dc 100644
--- a/bot/exts/events/trivianight/_questions.py
+++ b/bot/exts/events/trivianight/_questions.py
@@ -127,7 +127,7 @@ class QuestionView(View):
if len(guesses) != 0:
answers_chosen = {
answer_choice: len(
- tuple(filter(lambda x: x[0] == answer_choice, guesses.values()))
+ tuple(filter(lambda x: x[0] == answer_choice, guesses.values())) # noqa: B023
)
for answer_choice in labels
}
diff --git a/bot/exts/events/trivianight/trivianight.py b/bot/exts/events/trivianight/trivianight.py
index 18d8327a..10435551 100644
--- a/bot/exts/events/trivianight/trivianight.py
+++ b/bot/exts/events/trivianight/trivianight.py
@@ -323,6 +323,6 @@ class TriviaNightCog(commands.Cog):
))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the TriviaNight cog."""
- bot.add_cog(TriviaNightCog(bot))
+ await bot.add_cog(TriviaNightCog(bot))
diff --git a/bot/exts/fun/anagram.py b/bot/exts/fun/anagram.py
index 79280fa9..d8ea6a55 100644
--- a/bot/exts/fun/anagram.py
+++ b/bot/exts/fun/anagram.py
@@ -104,6 +104,6 @@ class Anagram(commands.Cog):
await game.message_creation(message)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Anagram cog."""
- bot.add_cog(Anagram(bot))
+ await bot.add_cog(Anagram(bot))
diff --git a/bot/exts/fun/battleship.py b/bot/exts/fun/battleship.py
index 77e38427..a8039cf2 100644
--- a/bot/exts/fun/battleship.py
+++ b/bot/exts/fun/battleship.py
@@ -442,6 +442,6 @@ class Battleship(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Battleship Cog."""
- bot.add_cog(Battleship(bot))
+ await bot.add_cog(Battleship(bot))
diff --git a/bot/exts/fun/catify.py b/bot/exts/fun/catify.py
index 32dfae09..6e8c75ba 100644
--- a/bot/exts/fun/catify.py
+++ b/bot/exts/fun/catify.py
@@ -81,6 +81,6 @@ class Catify(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Loads the catify cog."""
- bot.add_cog(Catify())
+ await bot.add_cog(Catify())
diff --git a/bot/exts/fun/coinflip.py b/bot/exts/fun/coinflip.py
index 804306bd..b7dee44d 100644
--- a/bot/exts/fun/coinflip.py
+++ b/bot/exts/fun/coinflip.py
@@ -48,6 +48,6 @@ class CoinFlip(commands.Cog):
await ctx.send(message)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Loads the coinflip cog."""
- bot.add_cog(CoinFlip())
+ await bot.add_cog(CoinFlip())
diff --git a/bot/exts/fun/connect_four.py b/bot/exts/fun/connect_four.py
index 1b88d065..0d870a6e 100644
--- a/bot/exts/fun/connect_four.py
+++ b/bot/exts/fun/connect_four.py
@@ -447,6 +447,6 @@ class ConnectFour(commands.Cog):
await self._play_game(ctx, None, board_size, str(emoji1), str(emoji2))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load ConnectFour Cog."""
- bot.add_cog(ConnectFour(bot))
+ await bot.add_cog(ConnectFour(bot))
diff --git a/bot/exts/fun/duck_game.py b/bot/exts/fun/duck_game.py
index 10b03a49..a2612e51 100644
--- a/bot/exts/fun/duck_game.py
+++ b/bot/exts/fun/duck_game.py
@@ -341,6 +341,6 @@ class DuckGamesDirector(commands.Cog):
return await ctx.send(file=file, embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the DuckGamesDirector cog."""
- bot.add_cog(DuckGamesDirector(bot))
+ await bot.add_cog(DuckGamesDirector(bot))
diff --git a/bot/exts/fun/fun.py b/bot/exts/fun/fun.py
index e7337cb6..779db977 100644
--- a/bot/exts/fun/fun.py
+++ b/bot/exts/fun/fun.py
@@ -157,6 +157,6 @@ class Fun(Cog):
await ctx.send(joke)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Fun cog."""
- bot.add_cog(Fun(bot))
+ await bot.add_cog(Fun(bot))
diff --git a/bot/exts/fun/game.py b/bot/exts/fun/game.py
index 4730d5b3..56e6314f 100644
--- a/bot/exts/fun/game.py
+++ b/bot/exts/fun/game.py
@@ -504,7 +504,7 @@ class Games(Cog):
return sorted((item for item in results if item[0] >= 0.60), reverse=True)[:4]
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Games cog."""
# Check does IGDB API key exist, if not, log warning and don't load cog
if not Tokens.igdb_client_id:
@@ -513,4 +513,4 @@ def setup(bot: Bot) -> None:
if not Tokens.igdb_client_secret:
logger.warning("No IGDB client secret. Not loading Games cog.")
return
- bot.add_cog(Games(bot))
+ await bot.add_cog(Games(bot))
diff --git a/bot/exts/fun/hangman.py b/bot/exts/fun/hangman.py
index a2c8c735..6c4ed69c 100644
--- a/bot/exts/fun/hangman.py
+++ b/bot/exts/fun/hangman.py
@@ -177,6 +177,6 @@ class Hangman(commands.Cog):
await ctx.send(embed=win_embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Hangman cog."""
- bot.add_cog(Hangman(bot))
+ await bot.add_cog(Hangman(bot))
diff --git a/bot/exts/fun/latex.py b/bot/exts/fun/latex.py
index aeabcd20..b5dada1c 100644
--- a/bot/exts/fun/latex.py
+++ b/bot/exts/fun/latex.py
@@ -133,6 +133,6 @@ class Latex(commands.Cog):
await ctx.send(file=discord.File(image_path, "latex.png"))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Latex Cog."""
- bot.add_cog(Latex(bot))
+ await bot.add_cog(Latex(bot))
diff --git a/bot/exts/fun/madlibs.py b/bot/exts/fun/madlibs.py
index 21708e53..5f3e0572 100644
--- a/bot/exts/fun/madlibs.py
+++ b/bot/exts/fun/madlibs.py
@@ -143,6 +143,6 @@ class Madlibs(commands.Cog):
error.handled = True
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Madlibs cog."""
- bot.add_cog(Madlibs(bot))
+ await bot.add_cog(Madlibs(bot))
diff --git a/bot/exts/fun/magic_8ball.py b/bot/exts/fun/magic_8ball.py
index a7b682ca..95d711c4 100644
--- a/bot/exts/fun/magic_8ball.py
+++ b/bot/exts/fun/magic_8ball.py
@@ -25,6 +25,6 @@ class Magic8ball(commands.Cog):
await ctx.send("Usage: .8ball <question> (minimum length of 3 eg: `will I win?`)")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Magic8Ball Cog."""
- bot.add_cog(Magic8ball())
+ await bot.add_cog(Magic8ball())
diff --git a/bot/exts/fun/minesweeper.py b/bot/exts/fun/minesweeper.py
index 782fb9d8..f16b1db2 100644
--- a/bot/exts/fun/minesweeper.py
+++ b/bot/exts/fun/minesweeper.py
@@ -265,6 +265,6 @@ class Minesweeper(commands.Cog):
del self.games[ctx.author.id]
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Minesweeper cog."""
- bot.add_cog(Minesweeper(bot))
+ await bot.add_cog(Minesweeper(bot))
diff --git a/bot/exts/fun/movie.py b/bot/exts/fun/movie.py
index 4418b938..b6289887 100644
--- a/bot/exts/fun/movie.py
+++ b/bot/exts/fun/movie.py
@@ -200,6 +200,6 @@ class Movie(Cog):
return embed
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Movie Cog."""
- bot.add_cog(Movie(bot))
+ await bot.add_cog(Movie(bot))
diff --git a/bot/exts/fun/quack.py b/bot/exts/fun/quack.py
index 0c228aed..77080760 100644
--- a/bot/exts/fun/quack.py
+++ b/bot/exts/fun/quack.py
@@ -70,6 +70,6 @@ class Quackstack(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Loads the Quack cog."""
- bot.add_cog(Quackstack(bot))
+ await bot.add_cog(Quackstack(bot))
diff --git a/bot/exts/fun/recommend_game.py b/bot/exts/fun/recommend_game.py
index 42c9f7c2..e972b9a5 100644
--- a/bot/exts/fun/recommend_game.py
+++ b/bot/exts/fun/recommend_game.py
@@ -46,6 +46,6 @@ class RecommendGame(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Loads the RecommendGame cog."""
- bot.add_cog(RecommendGame(bot))
+ await bot.add_cog(RecommendGame(bot))
diff --git a/bot/exts/fun/rps.py b/bot/exts/fun/rps.py
index c6bbff46..50129835 100644
--- a/bot/exts/fun/rps.py
+++ b/bot/exts/fun/rps.py
@@ -52,6 +52,6 @@ class RPS(commands.Cog):
await ctx.send(f"Sir Lancebot played {bot_move}! {player_mention} lost!")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the RPS Cog."""
- bot.add_cog(RPS(bot))
+ await bot.add_cog(RPS(bot))
diff --git a/bot/exts/fun/snakes/__init__.py b/bot/exts/fun/snakes/__init__.py
index ba8333fd..8aa39fb5 100644
--- a/bot/exts/fun/snakes/__init__.py
+++ b/bot/exts/fun/snakes/__init__.py
@@ -6,6 +6,6 @@ from bot.exts.fun.snakes._snakes_cog import Snakes
log = logging.getLogger(__name__)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Snakes Cog."""
- bot.add_cog(Snakes(bot))
+ await bot.add_cog(Snakes(bot))
diff --git a/bot/exts/fun/space.py b/bot/exts/fun/space.py
index 0bbe0b33..22a89050 100644
--- a/bot/exts/fun/space.py
+++ b/bot/exts/fun/space.py
@@ -227,10 +227,10 @@ class Space(Cog):
).set_image(url=image).set_footer(text="Powered by NASA API" + footer)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Space cog."""
if not Tokens.nasa:
logger.warning("Can't find NASA API key. Not loading Space Cog.")
return
- bot.add_cog(Space(bot))
+ await bot.add_cog(Space(bot))
diff --git a/bot/exts/fun/speedrun.py b/bot/exts/fun/speedrun.py
index c2966ce1..43e570a2 100644
--- a/bot/exts/fun/speedrun.py
+++ b/bot/exts/fun/speedrun.py
@@ -21,6 +21,6 @@ class Speedrun(commands.Cog):
await ctx.send(choice(LINKS))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Speedrun cog."""
- bot.add_cog(Speedrun())
+ await bot.add_cog(Speedrun())
diff --git a/bot/exts/fun/status_codes.py b/bot/exts/fun/status_codes.py
index 501cbe0a..cf544a19 100644
--- a/bot/exts/fun/status_codes.py
+++ b/bot/exts/fun/status_codes.py
@@ -82,6 +82,6 @@ class HTTPStatusCodes(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the HTTPStatusCodes cog."""
- bot.add_cog(HTTPStatusCodes(bot))
+ await bot.add_cog(HTTPStatusCodes(bot))
diff --git a/bot/exts/fun/tic_tac_toe.py b/bot/exts/fun/tic_tac_toe.py
index 5dd38a81..fa2a7531 100644
--- a/bot/exts/fun/tic_tac_toe.py
+++ b/bot/exts/fun/tic_tac_toe.py
@@ -333,6 +333,6 @@ class TicTacToe(Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the TicTacToe cog."""
- bot.add_cog(TicTacToe())
+ await bot.add_cog(TicTacToe())
diff --git a/bot/exts/fun/trivia_quiz.py b/bot/exts/fun/trivia_quiz.py
index 4a1cec5b..31652374 100644
--- a/bot/exts/fun/trivia_quiz.py
+++ b/bot/exts/fun/trivia_quiz.py
@@ -435,7 +435,7 @@ class TriviaQuiz(commands.Cog):
def contains_correct_answer(m: discord.Message) -> bool:
return m.channel == ctx.channel and any(
fuzz.ratio(answer.lower(), m.content.lower()) > variation_tolerance
- for answer in quiz_entry.answers
+ for answer in quiz_entry.answers # noqa: B023
)
return contains_correct_answer
@@ -670,6 +670,6 @@ class TriviaQuiz(commands.Cog):
await channel.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the TriviaQuiz cog."""
- bot.add_cog(TriviaQuiz(bot))
+ await bot.add_cog(TriviaQuiz(bot))
diff --git a/bot/exts/fun/uwu.py b/bot/exts/fun/uwu.py
index 83497893..7a9d55d0 100644
--- a/bot/exts/fun/uwu.py
+++ b/bot/exts/fun/uwu.py
@@ -199,6 +199,6 @@ class Uwu(Cog):
await ctx.send(content=converted_text, embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the uwu cog."""
- bot.add_cog(Uwu(bot))
+ await bot.add_cog(Uwu(bot))
diff --git a/bot/exts/fun/wonder_twins.py b/bot/exts/fun/wonder_twins.py
index 79d6b6d9..0c5b0a76 100644
--- a/bot/exts/fun/wonder_twins.py
+++ b/bot/exts/fun/wonder_twins.py
@@ -44,6 +44,6 @@ class WonderTwins(Cog):
await ctx.send(f"Form of {self.format_phrase()}!")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the WonderTwins cog."""
- bot.add_cog(WonderTwins())
+ await bot.add_cog(WonderTwins())
diff --git a/bot/exts/fun/xkcd.py b/bot/exts/fun/xkcd.py
index b56c53d9..380c3c80 100644
--- a/bot/exts/fun/xkcd.py
+++ b/bot/exts/fun/xkcd.py
@@ -86,6 +86,6 @@ class XKCD(Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the XKCD cog."""
- bot.add_cog(XKCD(bot))
+ await bot.add_cog(XKCD(bot))
diff --git a/bot/exts/holidays/earth_day/save_the_planet.py b/bot/exts/holidays/earth_day/save_the_planet.py
index 13c84886..63836faf 100644
--- a/bot/exts/holidays/earth_day/save_the_planet.py
+++ b/bot/exts/holidays/earth_day/save_the_planet.py
@@ -20,6 +20,6 @@ class SaveThePlanet(commands.Cog):
await ctx.send(embed=return_embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Save the Planet Cog."""
- bot.add_cog(SaveThePlanet())
+ await bot.add_cog(SaveThePlanet())
diff --git a/bot/exts/holidays/easter/april_fools_vids.py b/bot/exts/holidays/easter/april_fools_vids.py
index ae22f751..7f46a569 100644
--- a/bot/exts/holidays/easter/april_fools_vids.py
+++ b/bot/exts/holidays/easter/april_fools_vids.py
@@ -25,6 +25,6 @@ class AprilFoolVideos(commands.Cog):
await ctx.send(f"Check out this April Fools' video by {channel}.\n\n{url}")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the April Fools' Cog."""
- bot.add_cog(AprilFoolVideos())
+ await bot.add_cog(AprilFoolVideos())
diff --git a/bot/exts/holidays/easter/bunny_name_generator.py b/bot/exts/holidays/easter/bunny_name_generator.py
index f767f7c5..50872ebc 100644
--- a/bot/exts/holidays/easter/bunny_name_generator.py
+++ b/bot/exts/holidays/easter/bunny_name_generator.py
@@ -89,6 +89,6 @@ class BunnyNameGenerator(commands.Cog):
await ctx.send(bunnified_name)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Bunny Name Generator Cog."""
- bot.add_cog(BunnyNameGenerator())
+ await bot.add_cog(BunnyNameGenerator())
diff --git a/bot/exts/holidays/easter/earth_photos.py b/bot/exts/holidays/easter/earth_photos.py
index 27442f1c..e60e2626 100644
--- a/bot/exts/holidays/easter/earth_photos.py
+++ b/bot/exts/holidays/easter/earth_photos.py
@@ -57,9 +57,9 @@ class EarthPhotos(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Earth Photos cog."""
if not Tokens.unsplash_access_key:
log.warning("No Unsplash access key found. Cog not loading.")
return
- bot.add_cog(EarthPhotos(bot))
+ await bot.add_cog(EarthPhotos(bot))
diff --git a/bot/exts/holidays/easter/easter_riddle.py b/bot/exts/holidays/easter/easter_riddle.py
index c9b7fc53..c5d7b164 100644
--- a/bot/exts/holidays/easter/easter_riddle.py
+++ b/bot/exts/holidays/easter/easter_riddle.py
@@ -107,6 +107,6 @@ class EasterRiddle(commands.Cog):
self.winners.add(message.author.mention)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Easter Riddle Cog load."""
- bot.add_cog(EasterRiddle(bot))
+ await bot.add_cog(EasterRiddle(bot))
diff --git a/bot/exts/holidays/easter/egg_decorating.py b/bot/exts/holidays/easter/egg_decorating.py
index 1db9b347..a9334820 100644
--- a/bot/exts/holidays/easter/egg_decorating.py
+++ b/bot/exts/holidays/easter/egg_decorating.py
@@ -114,6 +114,6 @@ class EggDecorating(commands.Cog):
return new_im
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Egg decorating Cog."""
- bot.add_cog(EggDecorating())
+ await bot.add_cog(EggDecorating())
diff --git a/bot/exts/holidays/easter/egg_facts.py b/bot/exts/holidays/easter/egg_facts.py
index 152af6a4..2fb2041e 100644
--- a/bot/exts/holidays/easter/egg_facts.py
+++ b/bot/exts/holidays/easter/egg_facts.py
@@ -50,6 +50,6 @@ class EasterFacts(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Easter Egg facts Cog."""
- bot.add_cog(EasterFacts(bot))
+ await bot.add_cog(EasterFacts(bot))
diff --git a/bot/exts/holidays/easter/egghead_quiz.py b/bot/exts/holidays/easter/egghead_quiz.py
index 06229537..8f3aa6b0 100644
--- a/bot/exts/holidays/easter/egghead_quiz.py
+++ b/bot/exts/holidays/easter/egghead_quiz.py
@@ -113,6 +113,6 @@ class EggheadQuiz(commands.Cog):
return await reaction.message.remove_reaction(reaction, user)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Egghead Quiz Cog."""
- bot.add_cog(EggheadQuiz())
+ await bot.add_cog(EggheadQuiz())
diff --git a/bot/exts/holidays/easter/traditions.py b/bot/exts/holidays/easter/traditions.py
index f54ab5c4..3ac5617c 100644
--- a/bot/exts/holidays/easter/traditions.py
+++ b/bot/exts/holidays/easter/traditions.py
@@ -23,6 +23,6 @@ class Traditions(commands.Cog):
await ctx.send(f"{random_country}:\n{traditions[random_country]}")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Traditions Cog."""
- bot.add_cog(Traditions())
+ await bot.add_cog(Traditions())
diff --git a/bot/exts/holidays/halloween/8ball.py b/bot/exts/holidays/halloween/8ball.py
index 4fec8463..21b55a01 100644
--- a/bot/exts/holidays/halloween/8ball.py
+++ b/bot/exts/holidays/halloween/8ball.py
@@ -26,6 +26,6 @@ class SpookyEightBall(commands.Cog):
await msg.edit(content=f"{choice[0]} \n{choice[1]}")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Spooky Eight Ball Cog."""
- bot.add_cog(SpookyEightBall())
+ await bot.add_cog(SpookyEightBall())
diff --git a/bot/exts/holidays/halloween/candy_collection.py b/bot/exts/holidays/halloween/candy_collection.py
index 220ba8e5..ee23ed59 100644
--- a/bot/exts/holidays/halloween/candy_collection.py
+++ b/bot/exts/holidays/halloween/candy_collection.py
@@ -214,6 +214,6 @@ class CandyCollection(commands.Cog):
await ctx.send(embed=e)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Candy Collection Cog."""
- bot.add_cog(CandyCollection(bot))
+ await bot.add_cog(CandyCollection(bot))
diff --git a/bot/exts/holidays/halloween/halloween_facts.py b/bot/exts/holidays/halloween/halloween_facts.py
index adde2310..a0d63f64 100644
--- a/bot/exts/holidays/halloween/halloween_facts.py
+++ b/bot/exts/holidays/halloween/halloween_facts.py
@@ -50,6 +50,6 @@ class HalloweenFacts(commands.Cog):
return discord.Embed(title=title, description=fact, color=PUMPKIN_ORANGE)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Halloween Facts Cog."""
- bot.add_cog(HalloweenFacts())
+ await bot.add_cog(HalloweenFacts())
diff --git a/bot/exts/holidays/halloween/halloweenify.py b/bot/exts/holidays/halloween/halloweenify.py
index 03b52589..a16ea6cc 100644
--- a/bot/exts/holidays/halloween/halloweenify.py
+++ b/bot/exts/holidays/halloween/halloweenify.py
@@ -59,6 +59,6 @@ class Halloweenify(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Halloweenify Cog."""
- bot.add_cog(Halloweenify())
+ await bot.add_cog(Halloweenify())
diff --git a/bot/exts/holidays/halloween/monsterbio.py b/bot/exts/holidays/halloween/monsterbio.py
index 0556a193..8e83e9d1 100644
--- a/bot/exts/holidays/halloween/monsterbio.py
+++ b/bot/exts/holidays/halloween/monsterbio.py
@@ -49,6 +49,6 @@ class MonsterBio(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Monster Bio Cog."""
- bot.add_cog(MonsterBio())
+ await bot.add_cog(MonsterBio())
diff --git a/bot/exts/holidays/halloween/monstersurvey.py b/bot/exts/holidays/halloween/monstersurvey.py
index f3433886..517f1bcb 100644
--- a/bot/exts/holidays/halloween/monstersurvey.py
+++ b/bot/exts/holidays/halloween/monstersurvey.py
@@ -200,6 +200,6 @@ class MonsterSurvey(Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Monster Survey Cog."""
- bot.add_cog(MonsterSurvey())
+ await bot.add_cog(MonsterSurvey())
diff --git a/bot/exts/holidays/halloween/scarymovie.py b/bot/exts/holidays/halloween/scarymovie.py
index 89310b97..74bcef90 100644
--- a/bot/exts/holidays/halloween/scarymovie.py
+++ b/bot/exts/holidays/halloween/scarymovie.py
@@ -120,6 +120,6 @@ class ScaryMovie(commands.Cog):
return embed
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Scary Movie Cog."""
- bot.add_cog(ScaryMovie(bot))
+ await bot.add_cog(ScaryMovie(bot))
diff --git a/bot/exts/holidays/halloween/spookygif.py b/bot/exts/holidays/halloween/spookygif.py
index 91d50fb9..750e86ca 100644
--- a/bot/exts/holidays/halloween/spookygif.py
+++ b/bot/exts/holidays/halloween/spookygif.py
@@ -33,6 +33,6 @@ class SpookyGif(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Spooky GIF Cog load."""
- bot.add_cog(SpookyGif(bot))
+ await bot.add_cog(SpookyGif(bot))
diff --git a/bot/exts/holidays/halloween/spookynamerate.py b/bot/exts/holidays/halloween/spookynamerate.py
index 02fb71c3..8c801a2f 100644
--- a/bot/exts/holidays/halloween/spookynamerate.py
+++ b/bot/exts/holidays/halloween/spookynamerate.py
@@ -386,6 +386,6 @@ class SpookyNameRate(Cog):
self.announce_name.cancel()
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the SpookyNameRate Cog."""
- bot.add_cog(SpookyNameRate(bot))
+ await bot.add_cog(SpookyNameRate(bot))
diff --git a/bot/exts/holidays/halloween/spookyrating.py b/bot/exts/holidays/halloween/spookyrating.py
index ec6e8821..373b6583 100644
--- a/bot/exts/holidays/halloween/spookyrating.py
+++ b/bot/exts/holidays/halloween/spookyrating.py
@@ -62,6 +62,6 @@ class SpookyRating(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Spooky Rating Cog."""
- bot.add_cog(SpookyRating())
+ await bot.add_cog(SpookyRating())
diff --git a/bot/exts/holidays/halloween/spookyreact.py b/bot/exts/holidays/halloween/spookyreact.py
index e228b91d..2cbabdb4 100644
--- a/bot/exts/holidays/halloween/spookyreact.py
+++ b/bot/exts/holidays/halloween/spookyreact.py
@@ -65,6 +65,6 @@ class SpookyReact(Cog):
return False
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Spooky Reaction Cog."""
- bot.add_cog(SpookyReact(bot))
+ await bot.add_cog(SpookyReact(bot))
diff --git a/bot/exts/holidays/hanukkah/hanukkah_embed.py b/bot/exts/holidays/hanukkah/hanukkah_embed.py
index 5767f91e..1ebc21e8 100644
--- a/bot/exts/holidays/hanukkah/hanukkah_embed.py
+++ b/bot/exts/holidays/hanukkah/hanukkah_embed.py
@@ -96,6 +96,6 @@ class HanukkahEmbed(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Hanukkah Embed Cog."""
- bot.add_cog(HanukkahEmbed(bot))
+ await bot.add_cog(HanukkahEmbed(bot))
diff --git a/bot/exts/holidays/pride/drag_queen_name.py b/bot/exts/holidays/pride/drag_queen_name.py
index bd01a603..0c1ca6fb 100644
--- a/bot/exts/holidays/pride/drag_queen_name.py
+++ b/bot/exts/holidays/pride/drag_queen_name.py
@@ -21,6 +21,6 @@ class DragNames(commands.Cog):
await ctx.send(random.choice(NAMES))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Drag Names Cog."""
- bot.add_cog(DragNames())
+ await bot.add_cog(DragNames())
diff --git a/bot/exts/holidays/pride/pride_anthem.py b/bot/exts/holidays/pride/pride_anthem.py
index e8a4563b..6b78cba1 100644
--- a/bot/exts/holidays/pride/pride_anthem.py
+++ b/bot/exts/holidays/pride/pride_anthem.py
@@ -46,6 +46,6 @@ class PrideAnthem(commands.Cog):
await ctx.send("I couldn't find a video, sorry!")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Pride Anthem Cog."""
- bot.add_cog(PrideAnthem())
+ await bot.add_cog(PrideAnthem())
diff --git a/bot/exts/holidays/pride/pride_facts.py b/bot/exts/holidays/pride/pride_facts.py
index 340f0b43..ae025ae7 100644
--- a/bot/exts/holidays/pride/pride_facts.py
+++ b/bot/exts/holidays/pride/pride_facts.py
@@ -94,6 +94,6 @@ class PrideFacts(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Pride Facts Cog."""
- bot.add_cog(PrideFacts(bot))
+ await bot.add_cog(PrideFacts(bot))
diff --git a/bot/exts/holidays/pride/pride_leader.py b/bot/exts/holidays/pride/pride_leader.py
index adf01134..120e9e16 100644
--- a/bot/exts/holidays/pride/pride_leader.py
+++ b/bot/exts/holidays/pride/pride_leader.py
@@ -112,6 +112,6 @@ class PrideLeader(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Pride Leader Cog."""
- bot.add_cog(PrideLeader(bot))
+ await bot.add_cog(PrideLeader(bot))
diff --git a/bot/exts/holidays/valentines/be_my_valentine.py b/bot/exts/holidays/valentines/be_my_valentine.py
index cbb95157..5ffd14e6 100644
--- a/bot/exts/holidays/valentines/be_my_valentine.py
+++ b/bot/exts/holidays/valentines/be_my_valentine.py
@@ -163,6 +163,6 @@ class BeMyValentine(commands.Cog):
return random.choice(self.valentines["valentine_compliments"])
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Be my Valentine Cog."""
- bot.add_cog(BeMyValentine(bot))
+ await bot.add_cog(BeMyValentine(bot))
diff --git a/bot/exts/holidays/valentines/lovecalculator.py b/bot/exts/holidays/valentines/lovecalculator.py
index 10dea9df..c212e833 100644
--- a/bot/exts/holidays/valentines/lovecalculator.py
+++ b/bot/exts/holidays/valentines/lovecalculator.py
@@ -95,6 +95,6 @@ class LoveCalculator(Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Love calculator Cog."""
- bot.add_cog(LoveCalculator())
+ await bot.add_cog(LoveCalculator())
diff --git a/bot/exts/holidays/valentines/movie_generator.py b/bot/exts/holidays/valentines/movie_generator.py
index d2dc8213..64b86f1b 100644
--- a/bot/exts/holidays/valentines/movie_generator.py
+++ b/bot/exts/holidays/valentines/movie_generator.py
@@ -62,6 +62,6 @@ class RomanceMovieFinder(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Romance movie Cog."""
- bot.add_cog(RomanceMovieFinder(bot))
+ await bot.add_cog(RomanceMovieFinder(bot))
diff --git a/bot/exts/holidays/valentines/myvalenstate.py b/bot/exts/holidays/valentines/myvalenstate.py
index 4b547d9b..8d8772d4 100644
--- a/bot/exts/holidays/valentines/myvalenstate.py
+++ b/bot/exts/holidays/valentines/myvalenstate.py
@@ -77,6 +77,6 @@ class MyValenstate(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Valenstate Cog."""
- bot.add_cog(MyValenstate())
+ await bot.add_cog(MyValenstate())
diff --git a/bot/exts/holidays/valentines/pickuplines.py b/bot/exts/holidays/valentines/pickuplines.py
index bc4b88c6..8562a07d 100644
--- a/bot/exts/holidays/valentines/pickuplines.py
+++ b/bot/exts/holidays/valentines/pickuplines.py
@@ -36,6 +36,6 @@ class PickupLine(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Pickup lines Cog."""
- bot.add_cog(PickupLine())
+ await bot.add_cog(PickupLine())
diff --git a/bot/exts/holidays/valentines/savethedate.py b/bot/exts/holidays/valentines/savethedate.py
index 3638c1ef..7fd644df 100644
--- a/bot/exts/holidays/valentines/savethedate.py
+++ b/bot/exts/holidays/valentines/savethedate.py
@@ -33,6 +33,6 @@ class SaveTheDate(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Save the date Cog."""
- bot.add_cog(SaveTheDate())
+ await bot.add_cog(SaveTheDate())
diff --git a/bot/exts/holidays/valentines/valentine_zodiac.py b/bot/exts/holidays/valentines/valentine_zodiac.py
index d1b3a630..0a28a5c5 100644
--- a/bot/exts/holidays/valentines/valentine_zodiac.py
+++ b/bot/exts/holidays/valentines/valentine_zodiac.py
@@ -141,6 +141,6 @@ class ValentineZodiac(commands.Cog):
log.trace("Embed from date successfully sent.")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Valentine zodiac Cog."""
- bot.add_cog(ValentineZodiac())
+ await bot.add_cog(ValentineZodiac())
diff --git a/bot/exts/holidays/valentines/whoisvalentine.py b/bot/exts/holidays/valentines/whoisvalentine.py
index 67e46aa4..c652e616 100644
--- a/bot/exts/holidays/valentines/whoisvalentine.py
+++ b/bot/exts/holidays/valentines/whoisvalentine.py
@@ -44,6 +44,6 @@ class ValentineFacts(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Who is Valentine Cog."""
- bot.add_cog(ValentineFacts())
+ await bot.add_cog(ValentineFacts())
diff --git a/bot/exts/utilities/bookmark.py b/bot/exts/utilities/bookmark.py
index 2e3458d8..4a21b2db 100644
--- a/bot/exts/utilities/bookmark.py
+++ b/bot/exts/utilities/bookmark.py
@@ -176,6 +176,6 @@ class Bookmark(commands.Cog):
await target_message.delete()
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Bookmark cog."""
- bot.add_cog(Bookmark(bot))
+ await bot.add_cog(Bookmark(bot))
diff --git a/bot/exts/utilities/challenges.py b/bot/exts/utilities/challenges.py
index ab7ae442..1a5bf289 100644
--- a/bot/exts/utilities/challenges.py
+++ b/bot/exts/utilities/challenges.py
@@ -336,6 +336,6 @@ class Challenges(commands.Cog):
await original_message.edit(embed=kata_embed, view=None)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Challenges cog."""
- bot.add_cog(Challenges(bot))
+ await bot.add_cog(Challenges(bot))
diff --git a/bot/exts/utilities/cheatsheet.py b/bot/exts/utilities/cheatsheet.py
index 33d29f67..3141a050 100644
--- a/bot/exts/utilities/cheatsheet.py
+++ b/bot/exts/utilities/cheatsheet.py
@@ -107,6 +107,6 @@ class CheatSheet(commands.Cog):
await ctx.send(content=description)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the CheatSheet cog."""
- bot.add_cog(CheatSheet(bot))
+ await bot.add_cog(CheatSheet(bot))
diff --git a/bot/exts/utilities/colour.py b/bot/exts/utilities/colour.py
index 5282bc6d..20f97e4b 100644
--- a/bot/exts/utilities/colour.py
+++ b/bot/exts/utilities/colour.py
@@ -260,6 +260,6 @@ class Colour(commands.Cog):
return f"#{self.colour_mapping[match]}"
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Colour cog."""
- bot.add_cog(Colour(bot))
+ await bot.add_cog(Colour(bot))
diff --git a/bot/exts/utilities/conversationstarters.py b/bot/exts/utilities/conversationstarters.py
index 8bf2abfd..410ea884 100644
--- a/bot/exts/utilities/conversationstarters.py
+++ b/bot/exts/utilities/conversationstarters.py
@@ -121,6 +121,6 @@ class ConvoStarters(commands.Cog):
self.bot.loop.create_task(self._listen_for_refresh(ctx.author, message))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the ConvoStarters cog."""
- bot.add_cog(ConvoStarters(bot))
+ await bot.add_cog(ConvoStarters(bot))
diff --git a/bot/exts/utilities/emoji.py b/bot/exts/utilities/emoji.py
index 2b2fab8a..ec40be01 100644
--- a/bot/exts/utilities/emoji.py
+++ b/bot/exts/utilities/emoji.py
@@ -120,6 +120,6 @@ class Emojis(commands.Cog):
await ctx.send(embed=emoji_information)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Emojis cog."""
- bot.add_cog(Emojis(bot))
+ await bot.add_cog(Emojis(bot))
diff --git a/bot/exts/utilities/epoch.py b/bot/exts/utilities/epoch.py
index 2a21688e..bf67067c 100644
--- a/bot/exts/utilities/epoch.py
+++ b/bot/exts/utilities/epoch.py
@@ -135,6 +135,6 @@ class TimestampMenuView(discord.ui.View):
return True
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Epoch cog."""
- bot.add_cog(Epoch(bot))
+ await bot.add_cog(Epoch(bot))
diff --git a/bot/exts/utilities/githubinfo.py b/bot/exts/utilities/githubinfo.py
index ed176290..a7979718 100644
--- a/bot/exts/utilities/githubinfo.py
+++ b/bot/exts/utilities/githubinfo.py
@@ -362,6 +362,6 @@ class GithubInfo(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the GithubInfo cog."""
- bot.add_cog(GithubInfo(bot))
+ await bot.add_cog(GithubInfo(bot))
diff --git a/bot/exts/utilities/pythonfacts.py b/bot/exts/utilities/pythonfacts.py
index ef190185..a5bfb612 100644
--- a/bot/exts/utilities/pythonfacts.py
+++ b/bot/exts/utilities/pythonfacts.py
@@ -31,6 +31,6 @@ class PythonFacts(commands.Cog):
await ctx.send(embed=embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the PythonFacts Cog."""
- bot.add_cog(PythonFacts())
+ await bot.add_cog(PythonFacts())
diff --git a/bot/exts/utilities/realpython.py b/bot/exts/utilities/realpython.py
index 5e9757d0..46b02866 100644
--- a/bot/exts/utilities/realpython.py
+++ b/bot/exts/utilities/realpython.py
@@ -94,6 +94,6 @@ class RealPython(commands.Cog):
await ctx.send(embed=article_embed)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Real Python Cog."""
- bot.add_cog(RealPython(bot))
+ await bot.add_cog(RealPython(bot))
diff --git a/bot/exts/utilities/reddit.py b/bot/exts/utilities/reddit.py
index fa50eb36..d6148abd 100644
--- a/bot/exts/utilities/reddit.py
+++ b/bot/exts/utilities/reddit.py
@@ -359,9 +359,9 @@ class Reddit(Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Reddit cog."""
if not RedditConfig.secret or not RedditConfig.client_id:
log.error("Credentials not provided, cog not loaded.")
return
- bot.add_cog(Reddit(bot))
+ await bot.add_cog(Reddit(bot))
diff --git a/bot/exts/utilities/stackoverflow.py b/bot/exts/utilities/stackoverflow.py
index 64455e33..b248e83f 100644
--- a/bot/exts/utilities/stackoverflow.py
+++ b/bot/exts/utilities/stackoverflow.py
@@ -83,6 +83,6 @@ class Stackoverflow(commands.Cog):
await ctx.send(embed=search_query_too_long)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Stackoverflow Cog."""
- bot.add_cog(Stackoverflow(bot))
+ await bot.add_cog(Stackoverflow(bot))
diff --git a/bot/exts/utilities/timed.py b/bot/exts/utilities/timed.py
index 2ea6b419..d419dd08 100644
--- a/bot/exts/utilities/timed.py
+++ b/bot/exts/utilities/timed.py
@@ -43,6 +43,6 @@ class TimedCommands(commands.Cog):
await ctx.send(f"Command execution for `{new_ctx.command}` finished in {(t_end - t_start):.4f} seconds.")
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Timed cog."""
- bot.add_cog(TimedCommands())
+ await bot.add_cog(TimedCommands())
diff --git a/bot/exts/utilities/twemoji.py b/bot/exts/utilities/twemoji.py
index a4477bc1..80b3b41c 100644
--- a/bot/exts/utilities/twemoji.py
+++ b/bot/exts/utilities/twemoji.py
@@ -144,6 +144,6 @@ class Twemoji(commands.Cog):
await ctx.send(embed=self.build_embed(codepoint))
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Twemoji cog."""
- bot.add_cog(Twemoji(bot))
+ await bot.add_cog(Twemoji(bot))
diff --git a/bot/exts/utilities/wikipedia.py b/bot/exts/utilities/wikipedia.py
index e5e8e289..d87982c9 100644
--- a/bot/exts/utilities/wikipedia.py
+++ b/bot/exts/utilities/wikipedia.py
@@ -93,6 +93,6 @@ class WikipediaSearch(commands.Cog):
)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the WikipediaSearch cog."""
- bot.add_cog(WikipediaSearch(bot))
+ await bot.add_cog(WikipediaSearch(bot))
diff --git a/bot/exts/utilities/wolfram.py b/bot/exts/utilities/wolfram.py
index 9a26e545..984431f0 100644
--- a/bot/exts/utilities/wolfram.py
+++ b/bot/exts/utilities/wolfram.py
@@ -288,6 +288,6 @@ class Wolfram(Cog):
await send_embed(ctx, message, color)
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the Wolfram cog."""
- bot.add_cog(Wolfram(bot))
+ await bot.add_cog(Wolfram(bot))
diff --git a/bot/exts/utilities/wtf_python.py b/bot/exts/utilities/wtf_python.py
index 980b3dba..0c0375cb 100644
--- a/bot/exts/utilities/wtf_python.py
+++ b/bot/exts/utilities/wtf_python.py
@@ -78,7 +78,7 @@ class WTFPython(commands.Cog):
match, certainty, _ = rapidfuzz.process.extractOne(query, self.headers.keys())
return match if certainty > MINIMUM_CERTAINTY else None
- @commands.command(aliases=("wtf", "WTF"))
+ @commands.command(aliases=("wtf",))
async def wtf_python(self, ctx: commands.Context, *, query: Optional[str] = None) -> None:
"""
Search WTF Python repository.
@@ -133,6 +133,6 @@ class WTFPython(commands.Cog):
self.fetch_readme.cancel()
-def setup(bot: Bot) -> None:
+async def setup(bot: Bot) -> None:
"""Load the WTFPython Cog."""
- bot.add_cog(WTFPython(bot))
+ await bot.add_cog(WTFPython(bot))