aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | Create boilerplate code for the commandsGravatar Den42002020-07-01-1/+18
| | | |
| | * | Add base Slowmode cogGravatar Den42002020-07-01-0/+15
| |/ /
| * | Merge pull request #981 from aeros/issue926-paginate-long-linesGravatar Mark2020-06-27-27/+149
| |\ \ | | | | | | | | Improve LinePaginator to support long lines
| | * | In LinePaginator.__init__(), fix scale_to_size ValueError messageGravatar Kyle Stanley2020-06-28-1/+1
| | | | | | | | | | | | Co-authored-by: Mark <[email protected]>
| | * | Lower LinePaginator max_size arg in CustomHelpCommand.send_bot_helpGravatar Kyle Stanley2020-06-28-1/+1
| | | |
| | * | Fix grammar in LinePaginator.add_lines() docstringGravatar Kyle Stanley2020-06-28-1/+1
| | | |
| | * | In LinePaginator, add limit of 2000 for max_size and scale_to_size argsGravatar Kyle Stanley2020-06-28-1/+11
| | | |
| | * | Remove shortening of nomination reasonsGravatar Kyle Stanley2020-06-27-3/+3
| | | | | | | | | | | | | | | | | | | | * Since LinePaginator now supports long lines, there's no need to shorten the nomination reason to 200 characters.
| | * | In LinePaginator, use ellipses to show line continuationGravatar Kyle Stanley2020-06-27-1/+5
| | | |
| | * | Add block comments to LinePaginator.add_line()Gravatar Kyle Stanley2020-06-27-0/+2
| | | |
| | * | Improve LinePaginator docstringsGravatar Kyle Stanley2020-06-27-5/+15
| | | |
| | * | Add space before comment in LinePaginator._split_remaining_words()Gravatar Kyle Stanley2020-06-26-0/+1
| | | | | | | | | | | | Co-authored-by: Leon Sandøy <[email protected]>
| | * | Improve LinePaginator.__init__() ValueError messageGravatar Kyle Stanley2020-06-26-1/+1
| | | | | | | | | | | | Co-authored-by: Leon Sandøy <[email protected]>
| | * | Merge branch 'master' into issue926-paginate-long-linesGravatar Kyle Stanley2020-06-26-399/+1140
| | |\ \ | | |/ / | |/| |
| * | | Merge pull request #1002 from ↵Gravatar kwzrd2020-06-22-23/+93
| |\ \ \ | | | | | | | | | | | | | | | | | | | | python-discord/bug/backend/bot-50/sync-ignore-guilds Sync: ignore events from other guilds
| | * \ \ Merge branch 'master' into bug/backend/bot-50/sync-ignore-guildsGravatar kwzrd2020-06-22-109/+375
| | |\ \ \ | | |/ / / | |/| | |
| * | | | Merge pull request #950 from ks129/logging-testsGravatar Kieran Siek2020-06-22-0/+32
| |\ \ \ \ | | | | | | | | | | | | Created tests for startup logging
| | * \ \ \ Merge branch 'master' into logging-testsGravatar Kieran Siek2020-06-22-790/+2732
| | |\ \ \ \ | | |/ / / / | |/| | | |
| | * | | | Logging Tests: Simplify `DEBUG_MODE` `False` testGravatar ks1292020-05-22-11/+1
| | | | | | | | | | | | | | | | | | | | | | | | - Remove embed attributes checks - Replace `self.dev_log.assert_awaited_once_with` with `self.dev_log.assert_awaited_once`.
| | * | | | Merge branch 'master' into logging-testsGravatar ks1292020-05-17-786/+1195
| | |\ \ \ \
| | * | | | | Created tests for `bot.cogs.logging` connected message.Gravatar ks1292020-04-14-0/+42
| | | | | | |
| | | | * | | Sync: fix guild ID checkGravatar MarkKoz2020-06-17-22/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Need to compare the IDs against each other rather than the Guild object against the ID.
| | | | * | | Sync: ignore 404s in on_user_updateGravatar MarkKoz2020-06-14-13/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 404s probably mean the user is from another guild.
| | | | * | | Sync tests: test listeners ignore events from other guildsGravatar MarkKoz2020-06-14-10/+54
| | | | | | |
| | | | * | | Sync: ignore events from other guildsGravatar MarkKoz2020-06-14-0/+18
| | | | | | |
| | | | | * | In LinePaginator, truncate words that exceed scale_to_sizeGravatar Kyle Stanley2020-06-26-12/+11
| | | | | | |
| | | | | * | Correctly pass scale_to_size in LinePaginator.paginate()Gravatar Kyle Stanley2020-06-26-1/+2
| | | | | | |
| | | | | * | Update LinePaginator.add_line() testsGravatar Kyle Stanley2020-06-26-5/+5
| | | | | | |
| | | | | * | Simplify LinePaginator continuation headerGravatar Kyle Stanley2020-06-26-4/+7
| | | | | | |
| | | | | * | Fix LinePaginator new page creationGravatar Kyle Stanley2020-06-26-8/+14
| | | | | | |
| | | | | * | Account for spaces in LinePaginator._split_remaining_lines()Gravatar Kyle Stanley2020-06-26-1/+1
| | | | | | |
| | | | | * | Merge branch 'master' into issue926-paginate-long-linesGravatar Kyle Stanley2020-06-04-1108/+2534
| | | | | |\ \
| | | | | * | | Fix _split_remaining_words() docstring summaryGravatar Kyle Stanley2020-06-04-1/+2
| | | | | | | |
| | | | | * | | Fix docstring for _split_remaing_words()Gravatar Kyle Stanley2020-06-04-3/+7
| | | | | | | |
| | | | | * | | Improve LinePaginator to support long linesGravatar Kyle Stanley2020-06-04-17/+98
| | | | | | | |
| | | | | | | * Use int literal instead of len for sliceGravatar Mark2020-06-16-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Kieran Siek <[email protected]>
| | | | | | | * ModLog: refactor on_member_updateGravatar MarkKoz2020-06-14-23/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Exclude all sequences/mapping types rather than excluding by name * Replace MEMBER_CHANGES_SUPPRESSED with excludes as DeepDiff args * Don't keep track of "done" attributes - there shouldn't be dupes
| | | | | | | * ModLog: fix excluded None values in on_member_updateGravatar MarkKoz2020-06-14-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was preventing diffs for added nicknames from showing, among other things.
| | | | | | | * ModLog: remove user diff in on_member_updateGravatar MarkKoz2020-06-14-21/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The correct event for user changes is on_user_update, so this code does nothing in the on_member_update event.
| | | | | | | * ModLog: fix AttributeError in on_member_updateGravatar MarkKoz2020-06-14-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `iterable_item_removed` and `iterable_item_added` lack `new_value` and `old_value`. Instead, they just contain the actual value added or removed. The code was incorrectly trying to access old and new values for the iterable changes. The iterable changes are only useful for the role diff, but they aren't even needed for that. The role diff calculation has been refactored to always get the diff rather than doing it only if it sees there has been a change to the `_roles` attribute. To be clear, `_roles` only has IDs, which is why its diff isn't that useful anyway. To use it, the code would have to get the Role objects, which is basically what the `roles` property already does. `_cs_roles` seems to be some Role object cache, but its reliability is unclear.
* | | | | | | | Incidents: archive incident attachmentsGravatar kwzrd2020-07-03-1/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no handling of file types as explained in the `archive` docstring. Testing indicates that relaying incidents with e.g. a text file attachment is simply a noop in the Discord GUI. If there is at least one attachment, we always only relay the one at index 0, as it is believed the user-sent messages can only contain one attachment at maximum. This also adds an extra test asserting the behaviour when an incident with an attachment is archived. The existing test for `archive` is adjusted to assume no attachments. Joe helped me conceive & test this. Co-authored-by: Joseph Banks <[email protected]>
* | | | | | | | Incidents: trace-level log incident embed creationGravatar kwzrd2020-07-02-0/+2
| | | | | | | |
* | | | | | | | Incidents: relay incidents as embeds rather than raw contentGravatar kwzrd2020-07-01-37/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This applies the previously defined `make_embed` function. As the `archive` function is now simpler, I decided to reduce the amount of whitespace ~ it's a lot more compact now. Tests are adjusted as appropriate.
* | | | | | | | Incidents: implement `make_embed` helper & testsGravatar kwzrd2020-07-01-1/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See `make_embed` docstring for further information. The tests are fairly loose and should be easily adjustable in the future should changes be made.
* | | | | | | | Incidents: pass `actioned_by` to `archive`Gravatar kwzrd2020-06-30-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an important piece of information that shall be relayed.
* | | | | | | | Incidents: revert latest 2 commitsGravatar kwzrd2020-06-30-75/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Decision was made to use embeds to archive incidents instead of webhooking the raw message. As such, we're reverting the branch to a state from which the adjustments will be easier to make. Reverted commits: * a8d179d9b04f54b20c5e870bcfa85c78c42c8dca * 6fa8caed037b247a7c194f58a4635de7dae21fd2
* | | | | | | | Incidents: append `actioned_by` to webhook usernameGravatar kwzrd2020-06-21-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Incident author and the moderator who actioned report are now passed through `make_username` to create the webhook username. Tests adjusted as appropriate.
* | | | | | | | Incidents: implement `make_username` helperGravatar kwzrd2020-06-21-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The justification is to incorporate the `actioned_by` name into the username in some way, and so the logical thing to do is to abstract this process into a helper so that it can easily be adjusted in the future. For now, I've chosen to separate the names by a pipe. Discord webhook username cannot exceed 80 characters in length, and so we cap it at this length by default. This is seen as more of an edge-case, but it should be accounted for, as we're not joining two names. The `max_length` param is configurable primarily for testing purposes, it probably should never be passed explicitly. This commit also provides two tests for the function.
* | | | | | | | Incidents tests: assert webhook username is de-clydedGravatar kwzrd2020-06-20-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See: a8b4e394d9da57287cd9497cd9bb0a97fa467e84
* | | | | | | | Incidents: de-clyde archive webhook usernameGravatar kwzrd2020-06-20-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With PR #1009 merged, we now apply the same fix to our relay function. This prevents the "clyde" word from sneaking into the webhook username, which is forbidden and will return a 400.