aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | | | | * Decorators: use new func utils in respect_role_hierarchyGravatar MarkKoz2020-07-31-30/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the `_get_arg_value` call with `function.get_arg_value` cause the latter makes use of bound arguments, which are more accurate.
| | | | | * Add a function to get bound argsGravatar MarkKoz2020-07-31-4/+17
| | | | | |
| | | | | * Add a function to wrap a decorator to use get_arg_valueGravatar MarkKoz2020-07-31-1/+28
| | | | | |
| | | | | * Reminders: make operations mutually exclusiveGravatar MarkKoz2020-07-31-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes race conditions between editing, deleting, and sending a reminder. If one operation is already happening, the others will be aborted.
| | | | | * Add util function to get value from argGravatar MarkKoz2020-07-31-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a more advanced version meant to eventually replace the `_get_arg_values` in decorators.py.
| | | | | * Decorators: pass bound arguments to callableGravatar MarkKoz2020-07-31-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bound arguments are more convenient to work with than the raw args and kwargs.
| | | | | * Decorators: clarify use of mutually_exclusive with commandsGravatar MarkKoz2020-07-31-0/+2
| | | | | |
| | | | | * Decorators: add logging for mutually_exclusiveGravatar MarkKoz2020-07-31-4/+12
| | | | | |
| | | | | * Decorators: fix lock creationGravatar MarkKoz2020-07-31-1/+1
| | | | | |
| | | | | * Decorators: support awaitables for resource IDGravatar MarkKoz2020-07-31-4/+11
| | | | | |
| | | | | * Decorators: drop arg pos/name support for mutually_exclusiveGravatar MarkKoz2020-07-31-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Supporting ID retrieval by arg name or position made for a confusing interface. I also doubt it would have been used much. A callable can achieve the same thing, albeit with a little more code. Now the decorator instead supports passing an ID directly or a callable.
| | | | | * Decorators: add mutually exclusive decoratorGravatar MarkKoz2020-07-31-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will be used to prevent race conditions on a resource by stopping all other access to the resource once its been acquired.
| | | | | * Decorators: create helper function to get arg valueGravatar MarkKoz2020-07-31-10/+24
| | | | | |
| | | | | * Decorators: clean up importsGravatar MarkKoz2020-07-31-28/+26
| | | | | |
| | | | | * Decorators: more accurate return type for checksGravatar MarkKoz2020-07-31-3/+3
| | | | | |
| | | | | * Reminders: fix reminder_id type annotationGravatar MarkKoz2020-07-31-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | It's fine to accept an int since it'll get converted to a string anyway.
| | | | | * Reminders: remove _delete_reminder functionGravatar MarkKoz2020-07-31-21/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only one call was benefiting from that function also cancelling the task. Therefore, the function was redundant and has been replaced with a direct request to delete. This change has the consequence of also fixing reminder tasks cancelling themselves. That issue was potentially suppressing errors (such as the duplicate DELETE request which was fixed earlier). Under normal circumstances, the scheduler will automatically removed finished tasks so tasks won't need to cancel/remove themselves.
| | | | | * Reminders: remove duplicate deletion in scheduled taskGravatar MarkKoz2020-07-31-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `send_reminder` already deletes the reminder so it's redundant to delete it in the scheduled task too.
* | | | | | Move AsyncCache max_size argument to __init__ from decoratorGravatar ks1292020-10-04-3/+4
| | | | | |
* | | | | | Make AsyncCache key tuple instead stringGravatar ks1292020-10-04-1/+1
| | | | | |
* | | | | | Move PEP URLs to class constantsGravatar ks1292020-10-04-7/+6
| | | | | |
* | | | | | Rename async cache instancesGravatar ks1292020-10-04-7/+5
| | | | | |
* | | | | | Fix lintingGravatar ks1292020-09-26-3/+2
| | | | | |
* | | | | | PEP: Split get_pep_embed to smaller partsGravatar ks1292020-09-26-22/+34
| | | | | |
* | | | | | Async Cache: Create class-based async cacheGravatar ks1292020-09-26-24/+37
| | | | | |
* | | | | | Merge remote-tracking branch 'upstream/master' into pep-improvisationsGravatar ks1292020-09-26-4294/+8799
|\| | | | |
| * | | | | Merge pull request #1161 from bast0006/feature-bast-user-token-notifyGravatar Mark2020-09-25-39/+188
| |\ \ \ \ \ | | | | | | | | | | | | | | Add userid decoding and user token detection to the token removal moderation feature
| | * | | | | Remove redundant is_valid_userid functionGravatar Bast2020-09-25-33/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | extract_user_id(id) is not None does the same job and is not worth the extra function
| | * | | | | Change the mod alert message component for the user token detectionGravatar Bast2020-09-24-46/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up mock usage, docstrings, unnecessarily split-lined function calls
| | * | | | | Add BOT vs USER token detection, properly handling bot tokens for bots in ↵Gravatar Bast2020-09-24-13/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the current server Also adjust the naming and purposes of the format messages to KNOWN and UNKNOWN token messages.
| | * | | | | Implement review-suggested changesGravatar Bast2020-09-24-67/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | userid -> user ID maybevalid -> maybe_valid remove collections import and added a new function that handles the "format user ID log message" and should_ping_everyone feature
| | * | | | | Merge branch 'master' into feature-bast-user-token-notifyGravatar Bast2020-09-21-270/+686
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Resynchronize changes with the new cog folder arrangement
| | * | | | | | Make token_remover check basic HMAC validity (not low entropy)Gravatar Bast2020-09-19-6/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Handles cases like xxx.xxxxx.xxxxxxxx where a user has intentionally censored part of a token, and will not consider them "valid"
| | * | | | | | Add feature to token_remover: log detected user ID, and ping if it's a user ↵Gravatar Bast2020-09-19-19/+90
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the server Updated tests This comes with a change that a user ID must actually be able to be decoded into an integer to be considered a valid token
| * | | | | | | Merge pull request #1171 from python-discord/kwzrd/log-levelsGravatar Mark2020-09-23-2/+2
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Adjust verification & incidents log levels
| | * | | | | | | Incidents: bump archive log to INFO levelGravatar kwzrd2020-09-23-1/+1
| | | | | | | | |
| | * | | | | | | Verification: reduce request dispatch log levelGravatar kwzrd2020-09-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid information duplication in production logs.
| * | | | | | | | Fix use of expanded infraction response for usernameGravatar MarkKoz2020-09-23-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | Fixes BOT-9A
| * | | | | | | Update format_user to remove username and add IDGravatar Joe Banks2020-09-23-4/+2
| | | | | | | |
| * | | | | | | Clean: fix mention in mod log messageGravatar MarkKoz2020-09-22-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes BOT-99
| * | | | | | | Avoid using discord.Object's repr as the username for infraction searchGravatar MarkKoz2020-09-22-0/+7
| | | | | | | |
| * | | | | | | Fix AttributeError for infraction user searches via the groupGravatar MarkKoz2020-09-22-1/+1
| | | | | | | |
| * | | | | | | Fix future date check in snowflake converterGravatar MarkKoz2020-09-22-1/+1
| | | | | | | |
| * | | | | | | Merge pull request #1126 from ↵Gravatar Mark2020-09-22-37/+22
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/feat/info/1125/user-cmd-whitelist-modmail Whitelist the modmail category for displaying verbose infraction info from the user command
| | * \ \ \ \ \ \ Merge branch 'master' into feat/info/1125/user-cmd-whitelist-modmailGravatar MarkKoz2020-09-22-3054/+2635
| | |\ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | |
| * | | | | | | | Merge pull request #1061 from python-discord/feat/frontend/533/mod-log-namesGravatar Mark2020-09-22-207/+209
| |\ \ \ \ \ \ \ \ | | |_|_|_|_|/ / / | |/| | | | | | | Use mentions for users in mod logs and infraction search results
| | * | | | | | | Filtering: add missing space to log msgGravatar Mark2020-09-22-1/+1
| | | | | | | | |
| | * | | | | | | Fix type annotation for expanded infractionsGravatar MarkKoz2020-09-22-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `_utils.Infraction` alias does not cover nested data structures. Therefore, it's inappropriate for expanded infraction API responses.
| | * | | | | | | Merge branch 'master' into feat/frontend/533/mod-log-namesGravatar MarkKoz2020-09-22-3016/+2690
| | |\ \ \ \ \ \ \ | | |/ / / / / / / | |/| | | | | | |
| * | | | | | | | Merge pull request #1168 from python-discord/feat/latencyGravatar Senjan212020-09-22-1/+69
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Latency cog for checking ping.