async def METHOD_NAME(self, ctx: commands.Context, *, query: str) -> None:
    """Renders the text in latex and sends the image."""
    query = _prepare_input(query)
    # the hash of the query is used as the filename in the cache.
    query_hash = hashlib.md5(query.encode()).hexdigest()  # noqa: S324
    image_path = CACHE_DIRECTORY / f"{query_hash}.png"
    async with ctx.typing():
        if not image_path.exists():
            try:
                with open(image_path, "wb") as out_file:
                    await self._generate_image(TEMPLATE.substitute(text=query), out_file)
            except (InvalidLatexError, LatexServerError) as err:
                embed = await self._prepare_error_embed(err)
                await ctx.send(embed=embed)
                image_path.unlink()
                return
        await ctx.send(file=discord.File(image_path, "latex.png"))