aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | | Decorators: use type aliases from function moduleGravatar MarkKoz2020-07-31-4/+2
| | |
* | | Decorators: remove default value for respect_role_hierarchyGravatar MarkKoz2020-07-31-3/+3
| | | | | | | | | | | | | | | Explicit is better than implicit, and this default value wasn't much of a convenience.
* | | 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.
* | Remove superfluous Available help channels.Gravatar Leon Sandøy2020-07-31-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds a little bit of logic to the Help Channel `init_available` coroutine, which runs when the cog loads. This ensures that if there are more help channels in available than there should be, we remove the superfluos ones. Previously, if the bot started with too many channels, it would maintain and defend that excessive amount. This is because we never actually count the number of channels before adding in new available channels whenever one disappears. If we ever get too many available channels in the future, this can be solved by simply reloading this cog.
* | Merge pull request #1073 from python-discord/fix/webhook_removerGravatar Leon Sandøy2020-07-30-1/+1
|\ \ | | | | | | Change regex so it catches new discord URL
| * | Use full flag name for case-insensitivityGravatar Senjan212020-07-30-1/+1
| | | | | | | | | | | | requested by lemon
| * | Missed `?` in regex.Gravatar Senjan212020-07-30-1/+1
| | |
| * | Use non-capturing group instead.Gravatar Senjan212020-07-30-1/+1
| | |
| * | Change regex so it catches new discord URLGravatar Senjan212020-07-30-1/+1
|/ /
* | Merge pull request #1072 from python-discord/fix/message_pinGravatar Sebastiaan Zeeff2020-07-30-0/+2
|\ \ | | | | | | Fix channel moving incase `message.pin` fails
| * | Fix channel moving incase `message.pin` failsGravatar Senjan212020-07-30-0/+2
|/ /
* | Merge pull request #1071 from python-discord/no_mod_alert_ping_for_dmsGravatar Dennis Pham2020-07-29-1/+1
|\ \ | | | | | | Don't ping everyone in #mod-alerts when tripping filter via DMs.
| * | Don't ping everyone when tripping filter in DMs.Gravatar Leon Sandøy2020-07-29-1/+1
|/ / | | | | | | | | | | | | | | | | We don't need a ping in #mod-alerts whenever someone is tripping a filter (like invites or bad language) in a DM to the bot. We can still send an embed, so that we can action it, but there is no urgent need to respond if it's just a direct message to the bot. This is particularly true now that we have #dm-log.
* | Merge pull request #1023 from ks129/help-channels-pinGravatar Mark2020-07-28-0/+24
|\ \ | | | | | | Help System: Implement question message pinning
| * \ Merge branch 'master' into help-channels-pinGravatar Mark2020-07-28-481/+2396
| |\ \ | |/ / |/| |
* | | Merge pull request #1069 from python-discord/fix/pollGravatar scragly2020-07-29-2/+2
|\ \ \
| * | | correct import orderGravatar Senjan212020-07-28-1/+1
| | | |
| * | | fix poll command by using clean_content converterGravatar Senjan212020-07-28-2/+2
|/ / /
* | | Allow specifying a channel to send !embed embedsGravatar kosayoda2020-07-28-3/+7
| | |
* | | Update IDs of Code Jam rolesGravatar Sebastiaan Zeeff2020-07-27-2/+2
| | | | | | | | | | | | I've updated the IDs of the two Code Jam Roles to the newly create roles we have.
* | | Fix: Implicit string concatenation considered harmfulGravatar kosayoda2020-07-24-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | Python joins two string adjacent string literals implicitly, which may cause unintended side effects when used with certain string methods. >>> 'A' ' '.join(['1', '2', '3']) '1A 2A 3'
* | | Merge pull request #1064 from python-discord/bug/1036/empty-embed-fieldsGravatar Dennis Pham2020-07-23-2/+5
|\ \ \ | | | | | | | | Check that embed desc is not Empty before stripping.
| * \ \ Merge branch 'master' into bug/1036/empty-embed-fieldsGravatar Dennis Pham2020-07-23-65/+88
| |\ \ \ | |/ / / |/| | |
* | | | Disabled burst_shared filter temporarilyGravatar Joe Banks2020-07-23-4/+0
| | | |
* | | | Merge pull request #1062 from python-discord/bug/util/897/truncate-charinfoGravatar Mark2020-07-22-21/+15
|\ \ \ \ | | | | | | | | | | Truncate charinfo results
| * \ \ \ Merge branch 'master' into bug/util/897/truncate-charinfoGravatar Mark2020-07-22-25/+234
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Merge pull request #1063 from python-discord/bug/util/jams-multi-categoriesGravatar Mark2020-07-22-40/+73
|\ \ \ \ \ | | | | | | | | | | | | Support multiple categories for code jam team creation
| * | | | | Jam tests: use the MAX_CHANNELS constant moreGravatar MarkKoz2020-07-22-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | It's clearer to write MAX_CHANNELS - 2 than a literal 48.
| * | | | | Jam tests: assert equality of new categoryGravatar MarkKoz2020-07-22-1/+2
| | | | | |
| * | | | | Jam tests: add subtests to non-existent category testGravatar MarkKoz2020-07-22-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test has to account for not only the name not matching, but also a lack of available spaces for new channels.
| * | | | | Jam tests: fix category testGravatar MarkKoz2020-07-22-14/+24
| | | | | |
| * | | | | Jams: create a new category if others are fullGravatar MarkKoz2020-07-22-20/+31
|/ / / / /
| * | | | Charinfo: correct char limit used in error messageGravatar Mark2020-07-22-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Kieran Siek <[email protected]>