| Commit message (Collapse) | Author | Age | Lines |
| |
|
|
|
|
|
| |
I missed a `get_user_info` in InfractionSearchQuery in bot.converts.
This method is now `fetch_user` in Discord.py 1.2.3.
|
|\
| |
| | |
Implement `!otn search`. Closes #408.
|
| |\
| |/
|/| |
|
|\ \
| | |
| | |
| | |
| | | |
Update discord.py version to 1.2.3
Co-authored-by: null <[email protected]>
|
| | | |
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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`.
|
|\ \
| | |
| | | |
Add tests for `bot.cogs.security`.
|
| | | |
|
|\ \ \
| | | |
| | | | |
Add tests for `bot.cogs.token_remover`.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| |/ /
|/| |
| | |
| | |
| | | |
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.
|
|\ \ \
| | | |
| | | | |
Validate `bot/resources/stars.json` in tests.
|
| |/ / |
|
| |/
|/| |
|
|\| |
|
| |\
| | |
| | | |
Add basic tests for `bot.pagination`.
|
| | | |
|
| |\ \
| | | |
| | | | |
Validate bot.cogs.antispam configuration on CI.
|
| | | |
| | | |
| | | | |
Co-Authored-By: Sebastiaan Zeeff <[email protected]>
|
| | | | |
|
|/ / / |
|
|\ \ \ |
|
| | | | |
|
|/ / / |
|
|\ \ \
| | |/
| |/| |
|
| |\ \
| | | |
| | | | |
Add tests for `bot.utils.checks`.
|
| | |/ |
|
|/ / |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/ |
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
The exception now expects channel IDs to be passed to it.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
| |
The check will behave like Discord.py's guild_only check by raising the
NoPrivateMessage exception.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Co-authored-by: Leon Sandøy <[email protected]>
|