diff options
| author | 2022-01-21 20:21:33 +0530 | |
|---|---|---|
| committer | 2022-01-21 20:21:33 +0530 | |
| commit | 9d49fa0ae13900be5f14d237f92c43d11d85dfc9 (patch) | |
| tree | 29f8397714b2ceaf594bff85ea63a44c3e9b1d85 /bot/exts/fun/latex.py | |
| parent | remove mpl from deps (diff) | |
rework directory structure
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/fun/latex.py (renamed from bot/exts/fun/latex/_latex_cog.py) | 9 | 
1 files changed, 7 insertions, 2 deletions
diff --git a/bot/exts/fun/latex/_latex_cog.py b/bot/exts/fun/latex.py index 72d48b2a..ac43e95b 100644 --- a/bot/exts/fun/latex/_latex_cog.py +++ b/bot/exts/fun/latex.py @@ -23,9 +23,9 @@ LATEX_API_URL = "https://rtex.probablyaweb.site/api/v2"  PASTEBIN_URL = "https://paste.pythondiscord.com"  THIS_DIR = Path(__file__).parent -CACHE_DIRECTORY = THIS_DIR / "cache" +CACHE_DIRECTORY = THIS_DIR / "_latex_cache"  CACHE_DIRECTORY.mkdir(exist_ok=True) -TEMPLATE = string.Template((THIS_DIR / "template.txt").read_text()) +TEMPLATE = string.Template(Path("bot/resources/fun/latex_template.txt").read_text())  def _prepare_input(text: str) -> str: @@ -101,3 +101,8 @@ class Latex(commands.Cog):                      image_path.unlink()                      return              await ctx.send(file=discord.File(image_path, "latex.png")) + + +def setup(bot: Bot) -> None: +    """Load the Latex Cog.""" +    bot.add_cog(Latex(bot))  |