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/fun/madlibs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bot/exts/fun/madlibs.py') 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)) -- cgit v1.2.3 From c27763e08aeb94d1f0c6388ca420058e15d31820 Mon Sep 17 00:00:00 2001 From: Izan Date: Sun, 2 Oct 2022 14:15:50 +0100 Subject: Fix position-only arg in madlibs.py --- bot/exts/fun/madlibs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bot/exts/fun/madlibs.py') diff --git a/bot/exts/fun/madlibs.py b/bot/exts/fun/madlibs.py index 5f3e0572..075dde75 100644 --- a/bot/exts/fun/madlibs.py +++ b/bot/exts/fun/madlibs.py @@ -93,7 +93,7 @@ class Madlibs(commands.Cog): await original_message.edit(embed=madlibs_embed) try: - message = await self.bot.wait_for(event="message", check=author_check, timeout=TIMEOUT) + message = await self.bot.wait_for("message", check=author_check, timeout=TIMEOUT) except TimeoutError: timeout_embed = discord.Embed( title=choice(NEGATIVE_REPLIES), -- cgit v1.2.3