Skip to content

Commit

Permalink
Clean up style and capitalisation
Browse files Browse the repository at this point in the history
  • Loading branch information
thxo committed Mar 20, 2021
1 parent 431e7d4 commit 9d5c5db
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions exts/tex.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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)
Expand All @@ -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)

Expand Down

0 comments on commit 9d5c5db

Please sign in to comment.