Skip to content

Commit

Permalink
Fix /ftinm not rinting the output
Browse files Browse the repository at this point in the history
This could cause float-typical long outputs when converting a value
like 6 ft 7 in, which should be ca. 2.01 m, but DTbot would say
2.0100000000000002 m.
  • Loading branch information
MajorTanya committed Jun 1, 2024
1 parent ada36b5 commit 76a8f50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ async def mft(self, interaction: discord.Interaction, meters: float):
@app_commands.describe(inches="The Inches part of the value")
async def ftinm(self, interaction: discord.Interaction, feet: float, inches: float):
meters = rint(feet * M_IN_FT) + rint(inches * (CM_IN_INCH / 100))
await interaction.response.send_message(f"{rint(feet)} ft {rint(inches)} in = {meters} m")
await interaction.response.send_message(f"{rint(feet)} ft {rint(inches)} in = {rint(meters)} m")

@app_commands.command(description="Converts from Meters to mixed Feet and Inches")
@app_commands.describe(meters="The value in Meters")
Expand Down

0 comments on commit 76a8f50

Please sign in to comment.