fix(moderation): fixed some issues with tdc
All checks were successful
Pylint / Pylint (push) Successful in 1m11s
All checks were successful
Pylint / Pylint (push) Successful in 1m11s
This commit is contained in:
parent
821c04732f
commit
e1f2c4b8e6
1 changed files with 6 additions and 6 deletions
|
@ -355,13 +355,13 @@ 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):
|
||||
"""This command converts a duration to a [`timedelta`]() Python object.
|
||||
async def timedeltaconvert(self, ctx: commands.Context, *, duration: str):
|
||||
"""This command converts a duration to a [`timedelta`](https://docs.python.org/3/library/datetime.html#datetime.timedelta) Python object.
|
||||
|
||||
## Example usage
|
||||
`-timedeltaconvert 1 day 15hr 82 minutes 52`
|
||||
## Output
|
||||
`1 day, 16:22:53`"""
|
||||
**Example usage**
|
||||
`-timedeltaconvert 1 day 15hr 82 minutes 52s`
|
||||
**Output**
|
||||
`1 day, 16:22:52`"""
|
||||
try:
|
||||
parsed_time = parse(duration, as_timedelta=True, raise_exception=True)
|
||||
await ctx.send(f"`{str(parsed_time)}`")
|
||||
|
|
Loading…
Reference in a new issue