Skip to content

Commit

Permalink
improve docs for durationconverter
Browse files Browse the repository at this point in the history
  • Loading branch information
cysabi committed Aug 16, 2023
1 parent a4283bb commit b74acf4
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions blurple/ext/time.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,23 @@


class DurationConverter(commands.Converter):
"""Converts to a duration of time."""

symbols = """
- years: `y/Y`, `yr(s)`, `year(s)`
- months: `m`, `mon(s)`, `month(s)`
- weeks: `w/W`, `week(s)`
- days: `d/D`, `day(s)`
- hours: `h/H`, `hr(s)`, `hour(s)`
- minutes: `M`, `min(s)`, `minute(s)`
- seconds: `s/S`, `sec(s)`, `second(s)`
Units must be provided in descending order of magnitude.
""" Converter to process text-based durations of time to datetime.
- years: `y/Y`, `yr(s)`, `year(s)`
- months: `m`, `mon(s)`, `month(s)`
- weeks: `w/W`, `week(s)`
- days: `d/D`, `day(s)`
- hours: `h/H`, `hr(s)`, `hour(s)`
- minutes: `M`, `min(s)`, `minute(s)`
- seconds: `s/S`, `sec(s)`, `second(s)`
Units must be provided in descending order of magnitude.
:Example Usage:
.. code-block:: python
from blurple import ext
async def mycommand(ctx, *, duration: ext.DurationConverter):
"""

complied = re.compile(
Expand Down

0 comments on commit b74acf4

Please sign in to comment.