code: async def jsk_cancel(self, ctx: commands.Context, *, index: int):
          
  
          if not self.tasks:
              return await ctx.send("No tasks to cancel.")
  
          if index == -1:
              task = self.tasks.pop()
          else:
              task = discord.utils.get(self.tasks, index=index)
              if task:
                  self.tasks.remove(task)
              else:
                  return await ctx.send("Unknown task.")
  
          task.task.cancel()
          return await ctx.send(f"Cancelled task {task.index}: `{task.ctx.command.qualified_name}`,"
                                f" invoked at {task.ctx.message.created_at.strftime('%Y-%m-%d %H:%M:%S')} UTC")
docs: Cancels a task with the given index.
  
          If the index passed is -1, will cancel the last task instead.