aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | | | | * | | | | | | | | | | | | | | | Fix test for token remover log messageGravatar MarkKoz2020-07-21-2/+1
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Use user mentions in infraction search resultsGravatar MarkKoz2020-07-21-14/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using our expanded API is more efficient than making a request to the Discord API for potentially every user in the search results. The data may not be up to date, but that's an acceptable compromise.
| | | | | | | | * | | | | | | | | | | | | | | | ModLog: use user mentionsGravatar MarkKoz2020-07-21-22/+12
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Filtering: use user mentions in mod logsGravatar MarkKoz2020-07-21-6/+5
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Filtering: refactor _add_stats to return a NamedTupleGravatar MarkKoz2020-07-21-25/+27
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Filtering: refactor sending of mod logGravatar MarkKoz2020-07-21-59/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A lot of redundant code existed between the message and eval filters.
| | | | | | | | * | | | | | | | | | | | | | | | Use user mentions in mod logsGravatar MarkKoz2020-07-21-10/+14
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Moderation: use user mentions in mod logsGravatar MarkKoz2020-07-21-18/+14
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Moderation: remove multiple active infractions checkGravatar MarkKoz2020-07-21-36/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The API was change a long time ago to not allow such a situation.
| | | | | | | | * | | | | | | | | | | | | | | | Superstarify: escape Markdown in nicknamesGravatar MarkKoz2020-07-21-1/+4
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | * | | | | | | | | | | | | | | | Superstarify: use user mentions in mod logsGravatar MarkKoz2020-07-21-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `format_user` isn't used in the apply mod log cause it already shows both the old and new nicknames elsewhere.
| | | | | | | | * | | | | | | | | | | | | | | | Add util function to format user namesGravatar MarkKoz2020-07-21-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used a lot when sending mod logs and will help with reducing redundancy and maintaining consistency.
| | | | | | | | * | | | | | | | | | | | | | | | Clean up importsGravatar MarkKoz2020-07-21-14/+13
| | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | * | | | | | | | | | | | | Constants: remove staff_channelsGravatar MarkKoz2020-09-02-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No longer being used anywhere.
| | | | | | | | | | | * | | | | | | | | | | | | Fix user command testsGravatar MarkKoz2020-08-26-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mocking the bot commands channel constant no longer worked after switching to `in_whitelist_check`.
| | | | | | | | | | | * | | | | | | | | | | | | Fix infraction counts being shown in wrong channelsGravatar MarkKoz2020-08-26-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They should only be shown in mod channels, not all staff channels. Fix #1127
| | | | | | | | | | | * | | | | | | | | | | | | Info: show verbose infractions if user cmd invoked in modmailGravatar MarkKoz2020-08-25-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #1125
| | | | | | | | | | | * | | | | | | | | | | | | Info: simplify channel redirection for the user commandGravatar MarkKoz2020-08-25-9/+5
| | | | | | | | | | | | |_|_|_|_|/ / / / / / / | | | | | | | | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `in_whitelist_check` is a convenient utility that does the same thing as the previous code.
| | | | | | | | | | | | | * | | | | | | | | | Update users on bot start via HTTP PATCH method and send only user ID and ↵Gravatar RohanJnr2020-09-25-3/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the modified user data.
| | | | | | | | | | | | | * | | | | | | | | | fix type and add variable type hintingGravatar RohanJnr2020-09-22-2/+1
| | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | | | | | | | Refactor code to make use of bulk create and update API endpoints.Gravatar RohanJnr2020-09-22-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of creating and updating a single user at a time, a list of dicts will be sent for bulk update and creation.
| | | | | | | | | | | | | * | | | | | | | | | Merge remote-tracking branch 'upstream/master' into smart_syncing_usersGravatar RohanJnr2020-09-21-257/+301
| | | | | | | | | | | | | |\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|_|_|_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | | Merge pull request #1103 from python-discord/feat/backend/160/cog-subdirsGravatar Kieran Siek2020-09-21-257/+301
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|/ / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | Move cogs to subdirectories
| | * | | | | | | | | | | | | | | | | | | | | Merge branch 'master' into feat/backend/160/cog-subdirsGravatar kosayoda2020-09-21-811/+1257
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | |/ / / / / / / / / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | | 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
| | | |_|_|_|_|_|_|_|_|_|_|_|_|_|_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | * | | | | | | | | refactor code to GET users from site endpoint `bot/users` with paginationGravatar RohanJnr2020-09-21-1/+29
| | |_|_|_|_|_|_|_|_|_|_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added method to recursively GET users if paginated and another method to parse URL and return endpoint and query parameters.
* | | | | | | | | | | | | | | | | | | | | Reschedule failed inventory updatesGravatar Numerlor2020-10-10-4/+35
| | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Remove sphinx and requests from PipfileGravatar Numerlor2020-10-10-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With our own implementation of sphinx's inventory fetching we no longer need the sphinx package, and requests which were used inside of it.
* | | | | | | | | | | | | | | | | | | | | Use new async inventory fetchingGravatar Numerlor2020-10-10-64/+7
| | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Handle errors on inventory fetchingGravatar Numerlor2020-10-10-2/+35
| | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Add async implementation of sphinx fetch_inventoryGravatar Numerlor2020-10-10-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The sphinx version of the function does a lot of checks that are unnecessary for the bot because it's not working with anything else related to docs. The custom implementation means we can throw some of the code out and get rid of sphinx as a dependency.
* | | | | | | | | | | | | | | | | | | | | Add parentheses for clarityGravatar Numerlor2020-10-10-1/+1
| | | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Make amount of included signatures configurableGravatar Numerlor2020-10-10-7/+10
| | | | | | | | | | | | | | | | | | | | |