Skip to content

Commit

Permalink
Update RESTPlugin instantiation in latex.py and unit_convert.py
Browse files Browse the repository at this point in the history
  • Loading branch information
patelheet30 committed Dec 31, 2023
1 parent eea0a8a commit ad3ff41
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions FormulaForge/Extensions/latex.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@



latex_images = arc.RESTPlugin[arc.RESTClient]("latex_images")
latex_images = arc.RESTPlugin("latex_images")

@latex_images.include
@arc.slash_command(name="latex_to_image", description="Convert LaTeX (Math Mode) to an image.")
async def latex_to_image(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
is_transparent: arc.Option[
bool,
arc.BoolParams(
Expand Down
12 changes: 6 additions & 6 deletions FormulaForge/Extensions/unit_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



unit_converter = arc.RESTPlugin[arc.RESTClient]("unit_converter")
unit_converter = arc.RESTPlugin("unit_converter")

unit_convert_group = unit_converter.include_slash_group("unit_convert", "Unit Converter Commands. (Temperature, Speed, Mass, Energy, Length)")

Expand Down Expand Up @@ -53,7 +53,7 @@ def embed_builder(value, from_unit, to_unit, converted_value):
@unit_convert_group.include
@arc.slash_subcommand(name="temperature", description="Convert temperature.")
async def temperature(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
temperature: arc.Option[
float,
arc.FloatParams(
Expand Down Expand Up @@ -84,7 +84,7 @@ async def temperature(
@unit_convert_group.include
@arc.slash_subcommand(name="speed", description="Convert speed.")
async def speed(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
speed: arc.Option[
float,
arc.FloatParams(
Expand Down Expand Up @@ -115,7 +115,7 @@ async def speed(
@unit_convert_group.include
@arc.slash_subcommand(name="mass", description="Convert mass.")
async def mass(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
mass: arc.Option[
float,
arc.FloatParams(
Expand Down Expand Up @@ -146,7 +146,7 @@ async def mass(
@unit_convert_group.include
@arc.slash_subcommand(name="energy", description="Convert energy.")
async def energy(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
energy: arc.Option[
float,
arc.FloatParams(
Expand Down Expand Up @@ -177,7 +177,7 @@ async def energy(
@unit_convert_group.include
@arc.slash_subcommand(name="length", description="Convert length.")
async def length(
ctx: arc.Context[arc.RESTClient],
ctx: arc.RESTContext,
length: arc.Option[
float,
arc.FloatParams(
Expand Down
2 changes: 1 addition & 1 deletion FormulaForge/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async def callback(self, context: miru.ModalContext[miru.REST]) -> None:

@client.include
@arc.slash_command(name="ping", description="Ping the bot.")
async def ping_slash(ctx: arc.Context[arc.RESTClient]) -> None:
async def ping_slash(ctx: arc.RESTContext) -> None:
await ctx.respond("Pong!")


Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
aiohttp==3.9.1
certifi==2023.11.17
fastapi==0.108.0
hikari[server]==2.0.0.dev122
hikari-arc @ git+https://github.com/hypergonial/hikari-arc@d9ec882e30f1522eddbd59b9f3a077122e77f212
hikari-arc @ git+https://github.com/hypergonial/hikari-arc@beb023a396c8bb42c1d32a1f1ef06df6e0dad815
hikari-miru @ git+https://github.com/hypergonial/hikari-miru.git@7e706d0894a02e5837ec817d66bc385024c62b09
matplotlib==3.8.2
python-dotenv==1.0.0
uvicorn==0.25.0
fastapi==0.108.0
matplotlib==3.8.2
uvicorn==0.25.0

0 comments on commit ad3ff41

Please sign in to comment.