mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 02:16:09 -05:00
Update [p]economyset slottime&paydaytime to use TimedeltaConverter and not accept negative integers (#4807)
* add a time converter, as well as not allowing negative integers * timedeltaconverter * styling and unused imports * update docstrings * update param name to "duration" instead of seconds * make timedelta default_unit seconds * better descriptions & docstrings * docs for updated paydaytime & slottime * Fix style * Few minor fixes * Cast `total_seconds()` return type to `int` * Fix one of my own issues * Make the duration argument catch-rest for convenience * One more fix for the docs Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This commit is contained in:
@@ -302,18 +302,20 @@ economyset paydaytime
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset paydaytime <seconds>
|
||||
[p]economyset paydaytime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the payday command.
|
||||
|
||||
Example:
|
||||
Examples:
|
||||
- ``[p]economyset paydaytime 86400``
|
||||
- ``[p]economyset paydaytime 1d``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The new number of seconds to wait in between uses of payday. Default is 300.
|
||||
- | ``<duration>`` The new duration to wait in between uses of payday. Default is 5 minutes.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-economyset-registeramount:
|
||||
|
||||
@@ -436,18 +438,20 @@ economyset slottime
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
[p]economyset slottime <seconds>
|
||||
[p]economyset slottime <duration>
|
||||
|
||||
**Description**
|
||||
|
||||
Set the cooldown for the slot machine.
|
||||
|
||||
Example:
|
||||
Examples:
|
||||
- ``[p]economyset slottime 10``
|
||||
- ``[p]economyset slottime 10m``
|
||||
|
||||
**Arguments**
|
||||
|
||||
- ``<seconds>`` The new number of seconds to wait in between uses of the slot machine. Default is 5.
|
||||
- | ``<duration>`` The new duration to wait in between uses of the slot machine. Default is 5 seconds.
|
||||
| Accepts: seconds, minutes, hours, days, weeks (if no unit is specified, the duration is assumed to be given in seconds)
|
||||
|
||||
.. _economy-command-leaderboard:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user