From 821c04732fef5c4351ea26da2140ab2ead023ef3 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Thu, 5 Oct 2023 09:55:22 -0400 Subject: [PATCH] fix(moderation): tdc was using xl stupid help formatting --- moderation/moderation.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/moderation/moderation.py b/moderation/moderation.py index 6566eb8..f1e49a8 100644 --- a/moderation/moderation.py +++ b/moderation/moderation.py @@ -355,13 +355,15 @@ class Moderation(commands.Cog): await interaction.response.send_message(send, ephemeral=True) @commands.command(aliases=["tdc"]) - async def timedeltaconvert(self, ctx: commands.Context, *, duration: str = None): - if not duration: - embed = discord.Embed(description=f"## timedeltaconvert\nThis command converts a duration to a `timedelta` Python object.\n### Example Usage\n`{ctx.prefix}timedeltaconvert 1 day 15hr 82 minutes 52 s`\n### Output\n`1 day, 16:22:52`", color=await self.bot.get_embed_color(None)) - await ctx.send(embed=embed) - else: - try: - parsed_time = parse(duration, as_timedelta=True, raise_exception=True) - await ctx.send(f"`{str(parsed_time)}`") - except ValueError: - await ctx.send("Please provide a convertible value!") + async def timedeltaconvert(self, ctx: commands.Context, duration: str): + """This command converts a duration to a [`timedelta`]() Python object. + + ## Example usage + `-timedeltaconvert 1 day 15hr 82 minutes 52` + ## Output + `1 day, 16:22:53`""" + try: + parsed_time = parse(duration, as_timedelta=True, raise_exception=True) + await ctx.send(f"`{str(parsed_time)}`") + except ValueError: + await ctx.send("Please provide a convertible value!")