aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | | | | Merge pull request #438 from python-discord/hemlock-infraction-date-humanizationGravatar Mark2019-09-18-2/+7
|\ \ \ \ \ | | | | | | | | | | | | Infraction Search Dates
| * | | | | Infraction Date HumanizationGravatar Daniel Brown2019-09-18-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Corrected an error that would have made the code bug out. Moved a closing parentheses to the correct spot. Signed-off-by: Daniel Brown <[email protected]>
| * | | | | Merge branch 'master' into hemlock-infraction-date-humanizationGravatar Daniel Brown2019-09-18-0/+195
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | Merge pull request #431 from python-discord/bot-cogs-information-testsGravatar Johannes Christ2019-09-18-0/+195
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add basic tests for `bot.cogs.information`.
| * | | | | | Add basic tests for `bot.cogs.information`.Gravatar Johannes Christ2019-09-18-0/+195
|/ / / / / /
| * | | | | Infraction Date HumanizationGravatar Daniel Brown2019-09-18-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed the if statement to use `is None` for code clarity. Signed-off-by: Daniel Brown <[email protected]>
| * | | | | Merge branches 'hemlock-infraction-date-humanization' and 'master' of ↵Gravatar Daniel Brown2019-09-18-8/+10
| |\ \ \ \ \ | |/ / / / / |/| | | | | | | | | | | https://github.com/python-discord/bot into hemlock-infraction-date-humanization
* | | | | | Merge pull request #437 from python-discord/codeblock-suggestion-escape-markdownGravatar Sebastiaan Zeeff2019-09-18-8/+10
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Escape markdown in codeblock suggestion embed
| * | | | | Merge branch 'master' into codeblock-suggestion-escape-markdownGravatar Sebastiaan Zeeff2019-09-18-4/+5
| |\ \ \ \ \ | |/ / / / / |/| | | | |
| * | | | | Escape markdown in codeblock suggestion embedGravatar Sebastiaan Zeeff2019-09-18-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/bot/issues/434 If the content we prepare for the codeblock suggestion embed defined in the `bot` cog contains markdown characters (e.g., `__`, `**`), this will cause Discord to apply markdown, since both the codeblock syntax example as well as the codeblock result example will contain the characters, making it a matched formatting pair. This will hide those characters, which often have a function in the code, and break the example of a formatted codeblock. To deal with that, I've added a regex substitution that substitutes markdown characters by an escaped version of that markdown character. Example: `'__hello__'` will become `'\_\_hello\_\_'` I've added this substitution to both paths in the `on_message` event listener, since we can't substitute at an earlier place due to it generating `SyntaxErrors` with the `ast.parse` check. This closes #434
| | * | | | Infraction Date HumanizationGravatar Daniel Brown2019-09-18-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Changed to use the format `"%Y-%m-%d %H:%M"`, which will turn out looking like `2019-09-18 13:59` Signed-off-by: Daniel Brown <[email protected]>
| | * | | | Infraction Date HumanizationGravatar Daniel Brown2019-09-18-2/+7
| |/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | - Changed the date returned on infraction searches to use the `"%c"` strftime format instead of the standard ISO format. Signed-off-by: Daniel Brown <[email protected]>
* | | | | Merge pull request #436 from python-discord/enhance-offtopicnames-searchGravatar Kieran Siek2019-09-18-4/+5
|\ \ \ \ \ | |/ / / / |/| | | | Enhance off-topic names search feature
| * | | | Enhance off-topic names search featureGravatar Sebastiaan Zeeff2019-09-17-4/+5
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/bot/issues/435 This commit is meant to enhance the search feature in three separate, but related ways: 1. By changing the type annotation of the query to OffTopicName, we will use the same character translation table for the query as we did when storing the off-topic name, leading to better matches. 2. By adding a membership test, `query in name`, we are better able to search for off-topic names using a substring. 3. Given point 1 and point 2, we can increase the cut-off value we use for `difflib.get_close_matches` so we reduce the number of matches that bear little resemblance to the query in our human eyes. This commit closes #435
* | | | Add basic tests for `bot.api`. (#424)Gravatar scragly2019-09-18-1/+126
|\ \ \ \ | | | | | | | | | | Add basic tests for `bot.api`.
| * | | | Recombine import groups.Gravatar scragly2019-09-18-1/+0
| | | | |
| * | | | Add basic tests for `bot.api`.Gravatar Johannes Christ2019-09-18-1/+127
|/ / / /
* | | | Validate configuration against typehints, remove old keys, renam… (#425)Gravatar scragly2019-09-18-13/+25
|\ \ \ \ | | | | | | | | | | Validate configuration against typehints, remove old keys, rename off_topic_3 key
| * | | | Validate configuration against typehints.Gravatar Johannes Christ2019-09-18-13/+25
|/ / / /
* | | | Add coverage reporting & JUnit XML to tests. (#432)Gravatar scragly2019-09-18-13/+75
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | Add coverage reporting & JUnit XML to tests. Co-authored-by: null <[email protected]>
| * \ \ \ Merge branch 'master' into add-pytest-covGravatar scragly2019-09-18-16/+108
| |\ \ \ \ | |/ / / / |/| | | |
* | | | | Add tests for `bot.converters`. (#418)Gravatar scragly2019-09-18-0/+93
|\ \ \ \ \ | | | | | | | | | | | | Add tests for `bot.converters`.
| * | | | | Add tests for `bot.converters`.Gravatar Johannes Christ2019-09-15-0/+93
| | | | | |
* | | | | | Merge pull request #422 from python-discord/bot-utils-checks-use-fixtureGravatar scragly2019-09-18-16/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | Use `@pytest.fixture` for creating contexts.
| * | | | | | Use `@pytest.fixture` for creating contexts.Gravatar Johannes Christ2019-09-15-16/+15
| | | | | | |
| | | * | | | Remove duplicate coverage.xml gitignoreGravatar scragly2019-09-17-3/+0
| | | | | | |
| | | * | | | Update lock to new coverage dependancies.Gravatar scragly2019-09-17-12/+56
| | | | | | |
| | | * | | | Add coverage reporting to tests.Gravatar Johannes Christ2019-09-17-1/+22
| |_|/ / / / |/| | | | |
* | | | | | Fix InfractionSearchQueryGravatar Sebastiaan Zeeff2019-09-16-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I missed a `get_user_info` in InfractionSearchQuery in bot.converts. This method is now `fetch_user` in Discord.py 1.2.3.
* | | | | | Merge pull request #429 from python-discord/otn-search-commandGravatar Leon Sandøy2019-09-16-0/+22
|\ \ \ \ \ \ | | | | | | | | | | | | | | Implement `!otn search`. Closes #408.
| * \ \ \ \ \ Merge branch 'master' into otn-search-commandGravatar Leon Sandøy2019-09-16-208/+485
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
* | | | | | | Update discord.py version to 1.2.3 (#433)Gravatar scragly2019-09-17-188/+247
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update discord.py version to 1.2.3 Co-authored-by: null <[email protected]>
| * | | | | | | Adjust to new cog method names.Gravatar scragly2019-09-17-5/+7
| | | | | | | |
| * | | | | | | Update discord.py version to 1.2.3Gravatar Sebastiaan Zeeff2019-09-16-183/+240
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have updated the discord.py version to 1.2.3. This includes changes throughout the entire code base, including: - All cogs now inherit from `discord.ext.commands.Cog`; - All of our ABCs now have `bot.utils.CogABCMeta` as a metaclass; - All event handlers in cogs are now decorated with `Cog.listener()`; - Some method names have changes, including: - get_message => fetch_message - get_webhook_info => fetch_webhook - A few occurences of `get_channel` have been replaced by the new coroutine `fetch_channel`; - I've had to patch a few lines of code to account for small differences between the versions, like `on_member_update` attribute names in ModLog and the fact the way we used `Context.invoke` a couple of times has stopped working. In addition, I've added a patch for a bug in discord.py (with the help of @Scragly). This discord.py version has a bug which causes the edited timestamp not to be processed for edited messages. It's already fixed on GitHub, but a bug fix release has not been released to PyPI. In the meantime, I've added a patch in `bot.patches.message_edited_at` and included conditional loading in `__main__`. Finally, I noticed a small bug in `bot.cogs.filtering` that I fixed; I replaces `return` with `continue` to make sure filtering for edited messages doesn't stop after the `rich_embed_filter`.
* | | | | | | Merge pull request #430 from python-discord/bot-cogs-security-testsGravatar Johannes Christ2019-09-15-0/+54
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add tests for `bot.cogs.security`.
| * | | | | | | Add tests for `bot.cogs.security`.Gravatar Johannes Christ2019-09-15-0/+54
| | | | | | | |
* | | | | | | | Merge pull request #428 from python-discord/bot-cogs-token-remover-testsGravatar Johannes Christ2019-09-15-1/+144
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add tests for `bot.cogs.token_remover`.
| * | | | | | | | Add tests for `bot.cogs.token_remover`.Gravatar Johannes Christ2019-09-15-1/+144
| | | | | | | | |
* | | | | | | | | Replaces all GitLab refs with GitHub.Gravatar Leon Sandøy2019-09-15-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were some GitLab references in various parts of the code, which were causing a problem with displaying icons in the bot connection embeds and other minor aesthetic issues. This commit replaces all links to GitLab with their GitHub equivalent, resolving these bugs.
* | | | | | | | | Changing the #dev-logs ID to new channel.Gravatar Leon Sandøy2019-09-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We retired the old #dev-logs channel (for security reasons) and have made a new one for public consumption. This commit changes the ID to match the new channel.
* | | | | | | | | Update site links to new URL schemeGravatar Sebastiaan Zeeff2019-09-15-11/+14
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some links still had the URL scheme of the old Flask website, I updated them to point to the correct pages on the new website.
* | | | | | | | Merge pull request #427 from python-discord/bot-resources-validation-testsGravatar scragly2019-09-16-0/+18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Validate `bot/resources/stars.json` in tests.
| * | | | | | | | Validate `bot/resources/stars.json` in tests.Gravatar Johannes Christ2019-09-15-0/+18
| |/ / / / / / /
| | * / / / / / Implement `!otn search`. Closes #408.Gravatar Johannes Christ2019-09-15-0/+22
| |/ / / / / / |/| | | | | |
* | | | | | | Merge branch 'master' of github.com:python-discord/botGravatar Leon Sandøy2019-09-15-2/+63
|\| | | | | |
| * | | | | | Merge pull request #423 from python-discord/bot-pagination-testsGravatar Johannes Christ2019-09-15-0/+29
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Add basic tests for `bot.pagination`.
| | * | | | | | Add basic tests for `bot.pagination`.Gravatar Johannes Christ2019-09-15-0/+29
| | |/ / / / /
| * | | | | | Merge pull request #417 from python-discord/validate-antispam-config-in-ciGravatar Johannes Christ2019-09-15-2/+34
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | Validate bot.cogs.antispam configuration on CI.
| | * | | | | | Typehint the result of `validate_config`.Gravatar Johannes Christ2019-09-15-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Co-Authored-By: Sebastiaan Zeeff <[email protected]>
| | * | | | | | Validate bot.cogs.antispam configuration on CI.Gravatar Johannes Christ2019-09-15-2/+34
| | | | | | | |