aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2020-07-03Move log to before what it's logging executes.Gravatar Den4200-6/+8
This makes sure the log will be made, since the operations executed are now below it.
2020-07-03Remove precision kwarg usageGravatar Den4200-9/+6
2020-07-03Outdated badge in README upset meGravatar Joseph Banks-1/+1
2020-07-01Use total_seconds method instead of seconds attributeGravatar Den4200-1/+1
2020-07-01Add comment explaining TypeErrorGravatar Den4200-0/+2
2020-07-01Catch TypeError when the slowmode delay is 0 secondsGravatar Den4200-1/+9
2020-07-01Forgot an await in the Duration converterGravatar Den4200-1/+1
2020-07-01Create DurationDelta converter and humanize timedelta output for Slowmode cog.Gravatar Den4200-14/+39
The DurationDelta converter will allow the Slowmode cog to use a formatted timestamp instead of an integer representing seconds. I created a new converter because the Duration converter returned a datetime.datetime object, instead of a time delta. Joe mentioned that I could just subtract the datetime.datetime object from datetime.utcnow(), but there is a small delay between conversion and when the function is actually executed. This caused something like `!slowmode set #python-general 5s` to set the slowmode delay to 4 seconds instead of 5. Now, with this new converter, the set command can be invoked using a formatted timestamp like so: `!slowmode set #python-general 4h23M19s`. This would set the slowmode delay in #python-general to 4 hours, 23 minutes, and 19 seconds. Of course that delay would be quite overkill for #python-general, but that's just for the sake of this example.
2020-07-01Add some logging for the Slowmode cogGravatar Den4200-0/+11
2020-07-01Create docstring for Slowmode cogGravatar Den4200-0/+1
2020-07-01Add reset_slowmode functionGravatar Den4200-0/+9
2020-07-01Ensure slowmode delay is between 0 and 21600 seconds before setting itGravatar Den4200-4/+10
2020-07-01Implement the set_slowmode functionGravatar Den4200-1/+5
2020-07-01Implement the get_slowmode functionGravatar Den4200-0/+2
2020-07-01Create boilerplate code for the commandsGravatar Den4200-1/+18
2020-07-01Add base Slowmode cogGravatar Den4200-0/+15
2020-06-28In LinePaginator.__init__(), fix scale_to_size ValueError messageGravatar Kyle Stanley-1/+1
Co-authored-by: Mark <[email protected]>
2020-06-28Lower LinePaginator max_size arg in CustomHelpCommand.send_bot_helpGravatar Kyle Stanley-1/+1
2020-06-28Fix grammar in LinePaginator.add_lines() docstringGravatar Kyle Stanley-1/+1
2020-06-28In LinePaginator, add limit of 2000 for max_size and scale_to_size argsGravatar Kyle Stanley-1/+11
2020-06-27Remove shortening of nomination reasonsGravatar Kyle Stanley-3/+3
* Since LinePaginator now supports long lines, there's no need to shorten the nomination reason to 200 characters.
2020-06-27In LinePaginator, use ellipses to show line continuationGravatar Kyle Stanley-1/+5
2020-06-27Add block comments to LinePaginator.add_line()Gravatar Kyle Stanley-0/+2
2020-06-27Improve LinePaginator docstringsGravatar Kyle Stanley-5/+15
2020-06-26Add space before comment in LinePaginator._split_remaining_words()Gravatar Kyle Stanley-0/+1
Co-authored-by: Leon Sandøy <[email protected]>
2020-06-26Improve LinePaginator.__init__() ValueError messageGravatar Kyle Stanley-1/+1
Co-authored-by: Leon Sandøy <[email protected]>
2020-06-26In LinePaginator, truncate words that exceed scale_to_sizeGravatar Kyle Stanley-12/+11
2020-06-26Correctly pass scale_to_size in LinePaginator.paginate()Gravatar Kyle Stanley-1/+2
2020-06-26Update LinePaginator.add_line() testsGravatar Kyle Stanley-5/+5
2020-06-26Simplify LinePaginator continuation headerGravatar Kyle Stanley-4/+7
2020-06-26Fix LinePaginator new page creationGravatar Kyle Stanley-8/+14
2020-06-26Account for spaces in LinePaginator._split_remaining_lines()Gravatar Kyle Stanley-1/+1