feat(aurora): moved the converter commands to their own convert command group
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 28s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 40s

This commit is contained in:
Seaswimmer 2024-08-12 20:46:40 -04:00
parent 9e2bcf9b00
commit e559db9f10
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -1224,7 +1224,12 @@ class Aurora(commands.Cog):
error("Please provide a valid GalacticBot moderation export file.")
)
@aurora.command(aliases=["dtc", "dt", "datetimeconvert"])
@aurora.group(autohelp=True, name="convert")
async def aurora_convert(self, ctx: commands.Context):
"""Convert strings to various Python objects."""
pass
@aurora_convert.command(aliases=["dt"])
async def datetime(self, ctx: commands.Context, *, date: str) -> None:
"""Convert a string to a datetime object.
@ -1243,7 +1248,7 @@ class Aurora(commands.Cog):
if e == OverflowError:
await ctx.send(error("Date is too far in the future!"))
@aurora.command(aliases=["tdc", "td", "timedeltaconvert"])
@aurora_convert.command(aliases=["td"])
async def timedelta(self, ctx: commands.Context, *, duration: str) -> None:
"""Convert a string to a timedelta.
@ -1260,7 +1265,7 @@ class Aurora(commands.Cog):
return
await ctx.send(f"`{parsed_time}`")
@aurora.command(aliases=["rdc", "rd", "relativedeltaconvert"])
@aurora_convert.command(aliases=["rd"])
async def relativedelta(self, ctx: commands.Context, *, duration: str) -> None:
"""Convert a string to a relativedelta.