From 2993a3e13bf1eb939bf4ac451ffe19b64a30709a Mon Sep 17 00:00:00 2001 From: Chris Lovering Date: Tue, 23 Aug 2022 21:38:49 +0100 Subject: Support discord.py's new async cog loading --- bot/exts/utilities/wtf_python.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bot/exts/utilities/wtf_python.py') 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)) -- cgit v1.2.3