aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | * | | | | | | Move general helper functions to submodule.Gravatar Numerlor2020-07-15-15/+14
| | | | | | | | | | |
| | | | * | | | | | | Merge branch 'master' into truncate-internal-evalGravatar Numerlor2020-06-21-492/+1374
| | | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # Conflicts: # bot/utils/__init__.py
| | | | * \ \ \ \ \ \ \ Merge branch 'master' into truncate-internal-evalGravatar Numerlor2020-05-30-963/+2140
| | | | |\ \ \ \ \ \ \ \
| | | | * | | | | | | | | Strip empty lines from int eval output.Gravatar Numerlor2020-05-30-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The output generates trailing newlines, which can cause the output to be uploaded to the paste service in cases where it's not needed, as discord will automatically remove those in messages.
| | | | * | | | | | | | | Truncate amount of lines in int eval output to 15.Gravatar Numerlor2020-05-30-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the amount of newlines was checked and uploaded to the paste service if above 15 but the sent message was not truncated to only include that amount of lines.
| | | | * | | | | | | | | Add tests for `send_to_paste_service`.Gravatar Numerlor2020-05-08-0/+74
| | | | | | | | | | | | |
| | | | * | | | | | | | | Adjust behaviour for new func usage.Gravatar Numerlor2020-05-07-14/+5
| | | | | | | | | | | | |
| | | | * | | | | | | | | Remove tests from moved function.Gravatar Numerlor2020-05-07-15/+0
| | | | | | | | | | | | |
| | | | * | | | | | | | | Log unexpected JSON responses.Gravatar Numerlor2020-05-07-0/+4
| | | | | | | | | | | | |
| | | | * | | | | | | | | continue on internal server errors.Gravatar Numerlor2020-05-07-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case we receive `"message"` in the json response, the server had an internal error and we can attempt the request again.
| | | | * | | | | | | | | Handle broad exceptions.Gravatar Numerlor2020-05-07-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case an unexpected exception happens, this allows us to try the request again or let the function exit gracefully in the case of multiple fails.
| | | | * | | | | | | | | Continue on failed connections.Gravatar Numerlor2020-05-07-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not using skipping the iteration but continuing directly caused `response_json` being checked but not defined in case of connection errors. Co-authored-by: MarkKoz <[email protected]>
| | | | * | | | | | | | | Use new util function for uploading output.Gravatar Numerlor2020-05-06-11/+2
| | | | | | | | | | | | |
| | | | * | | | | | | | | Handle failed paste uploads.Gravatar Numerlor2020-05-06-1/+6
| | | | | | | | | | | | |
| | | | * | | | | | | | | Increase log level.Gravatar Numerlor2020-05-06-1/+1
| | | | | | | | | | | | |
| | | | * | | | | | | | | Send long eval output to paste service.Gravatar Numerlor2020-05-06-0/+10
| | | | | | | | | | | | |
| | | | * | | | | | | | | Attempt requests multiple times with connection errors.Gravatar Numerlor2020-05-05-12/+17
| | | | | | | | | | | | |
| | | | * | | | | | | | | Create utility function for uploading to paste service.Gravatar Numerlor2020-05-05-0/+33
| | | | | | | | | | | | |
| | | | | | | * | | | | | Categorise most of the uncategorised extensionsGravatar MarkKoz2020-08-19-5/+5
| | | | | | | | | | | | |
| | | | | | | * | | | | | Dynamically discover and load extensions upon startupGravatar MarkKoz2020-08-19-61/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Being explicit is nice, but the list of extensions to load has gotten quite long. It's a bit of an eyesore. It's still fairly easy to temporarily exclude extensions: just remove them from the set. Granted, being able to comment them out was more convenient.
| | | | | | | * | | | | | Extensions: move utility functions to a utility moduleGravatar MarkKoz2020-08-19-29/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makes the cog cleaner and makes the functions more accessible for other modules.
| | | | | | | * | | | | | Extensions: beautify name unqualificationGravatar MarkKoz2020-08-19-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Yes, that's a real word.
| | | | | | | * | | | | | Replace relative imports with absolute onesGravatar MarkKoz2020-08-19-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PEP 8 recommends absolute imports over relative ones.
| | | | | | | * | | | | | Add comment to explain why import is deferredGravatar MarkKoz2020-08-19-0/+1
| | | | | | | | | | | | |
| | | | | | | * | | | | | Rename "cogs" directory to "exts"Gravatar MarkKoz2020-08-14-163/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The directory contains modules, which are extensions. It only indirectly contains cogs through the extensions. Therefore, a technically more accurate name is "extensions", or "exts" when abbreviated. Furthermore, "exts" is consistent with SeasonalBot.
| | | | | | | * | | | | | Defer imports in extensions using __init__.pyGravatar MarkKoz2020-08-14-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `pkgutil.walk_packages` imports packages it comes across, it's best to avoid potential side effects from imports.
| | | | | | | * | | | | | Extensions: support unqualified extension namesGravatar MarkKoz2020-08-14-3/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's convenient for users to type less to specify the exception they want. Only require a qualified name if an unqualified name is ambiguous (i.e. two modules in different subpackages have identical names).
| | | | | | | * | | | | | Extensions: refactor category grouping codeGravatar MarkKoz2020-08-14-3/+2
| | | | | | | | | | | | |
| | | | | | | * | | | | | Extensions: support nested groupings in list commandGravatar MarkKoz2020-08-14-6/+5
| | | | | | | | | | | | |
| | | | | | | * | | | | | Extensions: group by category in list commandGravatar MarkKoz2020-08-14-9/+29
| | | | | | | | | | | | |
| | | | | | | * | | | | | Extensions: adjust discovery to work with dir structureGravatar MarkKoz2020-08-14-8/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discover extensions recursively and ignore any modules/packages whose names start with an underscore.
| | | | | | | * | | | | | Fix paths used to load extensionsGravatar MarkKoz2020-08-14-38/+55
| | | | | | | | | | | | |
| | | | | | | * | | | | | Fix ModLog importsGravatar MarkKoz2020-08-14-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bunch of modules still rely on importing the cog directly from the moderation package.
| | | | | | | * | | | | | Prefix names of non-extension modules with _Gravatar MarkKoz2020-08-14-87/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This naming scheme will make them easy to distinguish from extensions.
| | | | | | | * | | | | | Restructure tests and fix broken testsGravatar MarkKoz2020-08-14-37/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cog tests structure should mirror the structure of the cogs folder. Fix some import/patch paths which broke due to the restructure.
| | | | | | | * | | | | | Move extensions into sub-directoriesGravatar MarkKoz2020-08-13-23/+23
| | | | | | | | | | | | |
| | | | | | | | * | | | | Apply recent changes of notify infraction to testGravatar ks1292020-09-20-3/+2
| | | | | | | | | | | | |
| | | | | | | | * | | | | Try to fix location from where post infraction test get IDGravatar ks1292020-09-20-2/+2
| | | | | | | | | | | | |
| | | | | | | | * | | | | Remove useless textwrap importGravatar ks1292020-09-20-1/+0
| | | | | | | | | | | | |
| | | | | | | | * | | | | Remove special shortening from reasonGravatar ks1292020-09-20-1/+1
| | | | | | | | | | | | |
| | | | | | | | * | | | | Shorten infraction text when any other field than reason is too longGravatar ks1292020-09-13-0/+4
| | | | | | | | | | | | |
| | | | | | | | * | | | | Restore newlines for `notify_infraction` embed descriptionGravatar Karlis S2020-07-06-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Truncate reason instead full content to avoid removing newlines
| | | | | | | | * | | | | Remove unnecessary if statement from send_private_embed testGravatar ks1292020-06-25-2/+1
| | | | | | | | | | | | |
| | | | | | | | * | | | | Reorder tests order to match with original fileGravatar ks1292020-06-24-65/+65
| | | | | | | | | | | | |
| | | | | | | | * | | | | Remove unnecessary `textwrap.dedent` in `notify_infraction`Gravatar ks1292020-06-24-6/+4
| | | | | | | | | | | | |
| | | | | | | | * | | | | Move infraction description template back to main file, apply it thereGravatar ks1292020-06-24-16/+18
| | | | | | | | | | | | |
| | | | | | | | * | | | | Fix test case key name in `test_notify_infraction`Gravatar ks1292020-06-24-1/+1
| | | | | | | | | | | | |
| | | | | | | | * | | | | Add other parameters to `test_post_user` `not_user` mockGravatar ks1292020-06-24-5/+5
| | | | | | | | | | | | |
| | | | | | | | * | | | | Remove unnecessary `log.debug` assert in `test_post_user`Gravatar ks1292020-06-24-8/+1
| | | | | | | | | | | | |
| | | | | | | | * | | | | Merge 2 if-else branches is `test_post_user`Gravatar ks1292020-06-24-5/+2
| | | | | | | | | | | | |