diff --git a/runtime.txt b/runtime.txt index 6919bf9..4b44813 100644 --- a/runtime.txt +++ b/runtime.txt @@ -1 +1 @@ -python-3.7.6 +python-3.11.1 diff --git a/src/cogs/configurator.py b/src/cogs/configurator.py index 8e0680e..894b514 100644 --- a/src/cogs/configurator.py +++ b/src/cogs/configurator.py @@ -51,7 +51,7 @@ async def setup(self, ctx: commands.Context) -> None: "4️⃣": (ChannelType.SCHEDULES.value, self._setup_schedules), "5️⃣": (ChannelType.SUGGESTIONS.value, self._setup_suggestions), "6️⃣": (ChannelType.TWITCH.value, self._setup_twitch), - "✅": ("All Modules", asyncio.coroutine(lambda *args, **kwargs: None)), + "✅": ("All Modules", self.do_nothing), } def check(reaction: discord.Reaction, user: discord.Member) -> bool: @@ -173,8 +173,8 @@ def msg_check(msg: discord.Message) -> bool: done, pending = await asyncio.wait( [ - self.client.wait_for("message", timeout=60, check=msg_check), - self.client.wait_for("reaction_add", timeout=60, check=skip_check), + asyncio.Task(self.client.wait_for("message", timeout=60, check=msg_check)), + asyncio.Task(self.client.wait_for("reaction_add", timeout=60, check=skip_check)), ], return_when=asyncio.FIRST_COMPLETED, ) @@ -215,6 +215,9 @@ def msg_check(msg: discord.Message) -> bool: await sent_msg.edit(embed=embed) await res_msg.delete() + async def do_nothing(self, *args, **kwargs): + pass + async def _setup_log(self, ctx: commands.Context, all_modules: bool = False): await self._setup_template( ctx, diff --git a/src/cogs/course_registration/course_cleanup.py b/src/cogs/course_registration/course_cleanup.py index c5e5faa..acaddf5 100644 --- a/src/cogs/course_registration/course_cleanup.py +++ b/src/cogs/course_registration/course_cleanup.py @@ -161,7 +161,7 @@ async def clone_cr(self, ctx: commands.Context) -> None: content: str = "\n".join(lines) await ctx.send(content) # quick and dirty way to ensure to some degree that embeds are created in order - asyncio.sleep(5) + await asyncio.sleep(5) await ctx.send("Cloning complete!")