aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
* 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
| | | |
* | | | Changing the prefix and domain backGravatar Leon Sandøy2019-09-15-2/+2
|/ / /
* | | Merge branch 'master' of github.com:python-discord/botGravatar Leon Sandøy2019-09-15-1/+1
|\ \ \
| * | | Ship `DEBUG` log messages to the site.Gravatar Johannes Christ2019-09-15-1/+1
| | | |
* | | | Setting the config to work with the pydis server.Gravatar Leon Sandøy2019-09-15-422/+63
|/ / /
* | | Merge branch 'master' of github.com:python-discord/botGravatar Leon Sandøy2019-09-15-0/+67
|\ \ \ | | |/ | |/|
| * | Merge pull request #419 from python-discord/bot-utils-checks-testsGravatar Johannes Christ2019-09-15-0/+67
| |\ \ | | | | | | | | Add tests for `bot.utils.checks`.
| | * | Add tests for `bot.utils.checks`.Gravatar Johannes Christ2019-09-15-0/+67
| | |/
* | / Bot Test Server default config, for testing.Gravatar Leon Sandøy2019-09-15-64/+423
|/ /
* | Adding the snekbox URL to the default config, fixing typo.Gravatar Leon Sandøy2019-09-15-2/+2
| |
* | Temporarily pointing config at django.pydis.comGravatar Leon Sandøy2019-09-15-2/+2
| |
* | Resolves a breaking bug in the Dockerfile.Gravatar Leon Sandøy2019-09-15-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We were using a pipenv run script to launch the bot, but pipenv run scripts assume that the run command will be run inside of a virtual environment. So, the default behaviour when we try to use a run command and no venv exists is to create a venv. Because we were installing all the packages to the local environment by passing the '--system' flag to our install, this would make the bot fail with ImportErrors. This commit fixes it so that the Dockerfile will run the bot using the system Python instead of the pipenv run script.
* | The DockerHub deployment should now run on 'master'Gravatar Leon Sandøy2019-09-15-34/+2
|/
* Tag Django images as `latest`.Gravatar Johannes Christ2019-09-15-2/+2
|
* Remove most local error handlers & handle InChannelCheckFailure globallyGravatar MarkKoz2019-09-14-81/+30
| | | | | | | | | * Add error handler to ignore InChannelCheckFailure in the verification cog * Raise InChannelCheckFailure instead of MissingPermissions in !user * Send message instead of raising BadArgument in !user to prevent help message from being shown in such case * Clean up !user command
* Ignore handled errors by checking for a "handled" attributeGravatar MarkKoz2019-09-14-3/+3
|
* Generate InChannelCheckFailure's message inside the exceptionGravatar MarkKoz2019-09-14-5/+6
| | | | The exception now expects channel IDs to be passed to it.
* Actually fix cog error handler check when command is NoneGravatar MarkKoz2019-09-14-1/+2
|
* Fix deleting already deleted message in antispamGravatar Sebastiaan Zeeff2019-09-15-3/+6
| | | | | | | | | | Since we're in an async context, it can happen that a message was already deleted before the antispam cog could get to it. To prevent processing from stopping dead because of a NotFound exception, I added a try-except and log message to handle that In addition, corrected a small mistake: trying to indice a single Message object. Corrected.
* Fix AntiSpam sending duplicate messages to APIGravatar Sebastiaan Zeeff2019-09-15-49/+143
| | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/bot/issues/412 https://github.com/python-discord/bot/issues/410 The AntiSpam cog had a bug that caused it to send the same messages in more than one request to the deleted messages API endpoint. Since the API rejects duplicate messages, all requests containing a duplicate message were rejected, even if the request contained new messages as well. This commit fixes that by gathering up all the messages of a single spam event into a single DeletionContext and sending that instead. This commit also prevents the bot fomr being bricked by a single misconfigured antispam configuration. Instead of raising a bare exception, it will now log the validation error and alert moderation on server that antispam has been disabled. closes #412, closes #410
* Fix cog error handler check when command is NoneGravatar MarkKoz2019-09-14-1/+1
|
* Improve logging of command errorsGravatar MarkKoz2019-09-14-13/+28
|
* Display no-DM error message originating from security cog's global checkGravatar MarkKoz2019-09-14-2/+4
| | | | | The check will behave like Discord.py's guild_only check by raising the NoPrivateMessage exception.
* Ignore errors from cogs with their own error handlersGravatar MarkKoz2019-09-14-5/+13
|
* Fixes a bug syncing roles for members who leave.Gravatar Leon Sandøy2019-09-14-1/+1
| | | | | | | | The event that was supposed to handle this was called on_member_leave instead of on_member_remove, so the even was never called when it should have been. This commit renames the method.
* Fixes a sneaky genexp exhaustion bug in @without_role.Gravatar Leon Sandøy2019-09-14-1/+1
| | | | | | | | This problem made the decorator only check the first role that was passed into it, instead of checking all the roles. In other words, the check would fail on *STAFF_ROLES unless you had the Helpers role. Solved by refactoring the genexp to a listcomp.
* Improve handling of long deleted messsagesGravatar Sebastiaan Zeeff2019-09-14-5/+8
| | | | | | | | | | | | | | | The `modlog` cog failed on long messages with attachments, since the inclusion of attachment metadata would bring the length of the embed description to go over the character limit of 2048. To fix this, I moved the addition of the attachment metadata to earlier in the code so it is taken into account for the character limit. In addition to this, I changed the truncation behavior. Instead of just truncating the message if it's too long, we now truncate and upload the full message to the `deleted messages` endpoint so the full message is still available. A link to the log will be included in the message-log embed.
* Fix tag command invocation in aliasesGravatar MarkKoz2019-09-14-2/+2
| | | | Co-authored-by: Leon Sandøy <[email protected]>
* Cogs.reload now has more readable error info.Gravatar Leon Sandøy2019-09-14-7/+7
| | | | | | | | When you run '!cogs reload *', the load failures will now include the Exception type, and has overall more readable formatting. Similarly, trying to do '!cogs load <some cog>' on a broken cog will show the Exception type as well.
* Oops, forgot to remove DEVOPS role alias, that would crash the bot.Gravatar Leon Sandøy2019-09-14-1/+0
|
* Merge branch 'django' of github.com:python-discord/bot into djangoGravatar Leon Sandøy2019-09-14-24/+50
|\