diff options
| author | 2021-04-11 01:11:21 +0100 | |
|---|---|---|
| committer | 2021-04-11 01:11:21 +0100 | |
| commit | bf1cd68efaa7f0fe5037c69fbdc7cfffcf284a2d (patch) | |
| tree | 48772cb873ddfdd0534312b5d21b19d9cfb40efa | |
| parent | removed unused cog init and fixed timing timed command (diff) | |
fix message updating and return types
| -rw-r--r-- | bot/exts/evergreen/timed.py | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/bot/exts/evergreen/timed.py b/bot/exts/evergreen/timed.py index 58da3dc8..57575993 100644 --- a/bot/exts/evergreen/timed.py +++ b/bot/exts/evergreen/timed.py @@ -12,7 +12,7 @@ class TimedCommands(commands.Cog):      async def create_execution_context(ctx: commands.Context, command: str) -> commands.Context:          """Get a new execution context for a command."""          msg: Message = copy(ctx.message) -        msg._update({"content": f"{ctx.prefix}{command}"}) +        msg.content = f"{ctx.prefix}{command}"          return await ctx.bot.get_context(msg) @@ -22,7 +22,8 @@ class TimedCommands(commands.Cog):          new_ctx = await self.create_execution_context(ctx, command)          if new_ctx.command and new_ctx.command.qualified_name == "timed": -            return await ctx.send("You are not allowed to time the execution of the `timed` command.") +            await ctx.send("You are not allowed to time the execution of the `timed` command.") +            return          t_start = perf_counter()          await new_ctx.command.invoke(new_ctx)  |