fix(moderation): tdc was using xl stupid help formatting
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
All checks were successful
Pylint / Pylint (push) Successful in 1m12s
This commit is contained in:
parent
21c9e28452
commit
821c04732f
1 changed files with 12 additions and 10 deletions
|
@ -355,13 +355,15 @@ class Moderation(commands.Cog):
|
||||||
await interaction.response.send_message(send, ephemeral=True)
|
await interaction.response.send_message(send, ephemeral=True)
|
||||||
|
|
||||||
@commands.command(aliases=["tdc"])
|
@commands.command(aliases=["tdc"])
|
||||||
async def timedeltaconvert(self, ctx: commands.Context, *, duration: str = None):
|
async def timedeltaconvert(self, ctx: commands.Context, duration: str):
|
||||||
if not duration:
|
"""This command converts a duration to a [`timedelta`]() Python object.
|
||||||
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)
|
## Example usage
|
||||||
else:
|
`-timedeltaconvert 1 day 15hr 82 minutes 52`
|
||||||
try:
|
## Output
|
||||||
parsed_time = parse(duration, as_timedelta=True, raise_exception=True)
|
`1 day, 16:22:53`"""
|
||||||
await ctx.send(f"`{str(parsed_time)}`")
|
try:
|
||||||
except ValueError:
|
parsed_time = parse(duration, as_timedelta=True, raise_exception=True)
|
||||||
await ctx.send("Please provide a convertible value!")
|
await ctx.send(f"`{str(parsed_time)}`")
|
||||||
|
except ValueError:
|
||||||
|
await ctx.send("Please provide a convertible value!")
|
||||||
|
|
Loading…
Reference in a new issue