From 9d5c5db197520858d3456e007cf502a3a2eac549 Mon Sep 17 00:00:00 2001 From: thxo Date: Sat, 20 Mar 2021 09:50:12 -0700 Subject: [PATCH] Clean up style and capitalisation --- exts/tex.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exts/tex.py b/exts/tex.py index e325105..ca59da5 100644 --- a/exts/tex.py +++ b/exts/tex.py @@ -18,15 +18,15 @@ class TexCog(commands.Cog): - # TeX rendering performed remotely using the rTex project. + # TeX rendering performed remotely using the rTeX project. # Documentation: https://rtex.probablyaweb.site/docs RTEX_INSTANCE = "https://rtex.probablyaweb.site/" def __init__(self, bot: commands.Bot): self.bot = bot self.session = aiohttp.ClientSession(connector=bot.qrm.connector) - with open(cmn.paths.resources / "template.1.tex") as words_file: - self.template = words_file.read() + with open(cmn.paths.resources / "template.1.tex") as latex_template: + self.template = latex_template.read() @commands.command(name="tex", aliases=["latex"], category=cmn.cat.fun) async def tex(self, ctx: commands.Context, *, expr: str): @@ -38,7 +38,7 @@ async def tex(self, ctx: commands.Context, *, expr: str): } with ctx.typing(): - # ask rTex to render our expression + # ask rTeX to render our expression async with self.session.post(urljoin(self.RTEX_INSTANCE, "api/v2"), json=payload) as r: if r.status != 200: raise cmn.BotHTTPError(r) @@ -58,7 +58,7 @@ async def tex(self, ctx: commands.Context, *, expr: str): embed = cmn.embed_factory(ctx) embed.title = "LaTeX Expression" - embed.description = f"Rendered by [rTex]({self.RTEX_INSTANCE})." + embed.description = f"Rendered by [rTeX]({self.RTEX_INSTANCE})." embed.set_image(url="attachment://tex.png") await ctx.send(file=discord.File(png_buffer, "tex.png"), embed=embed)