| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | |/ / / / / / / |
|
| | |\ \ \ \ \ \ \
| | |_|/ / / / /
| |/| | | | | | |
Show created date and duration in expired infraction log
|
| | | |\ \ \ \ \ \
| | |/ / / / / /
| |/| | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The bot user was always being used instead of using the actor field
of the infraction.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Closes #685
|
| | | | |_|/ / /
| | |/| | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The absolute value is useful for preventing negative values in the case
that date_to is in the past relative to date_from.
* Add an absolute parameter to take the absolute value of the duration
* Rename expiry to date_to
* Rewrite the docstring
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | |\ \ \ \ |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This will prevent child classes to be instantiated unless they implement
all abstract methods, leading to a more descriptive error message.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
This will serve as an ABC for tests for individual rules.
The base class provides runners for allowed and disallowed
cases, and the children classes then only provide the cases
and implementations of helper methods specific to each rule.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The name msg is less descriptive and creates a needless name conflict in local gen exp.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The rule was incorrectly printing out the maximum amount of allowed attachments
instead of the configured interval. This commit also adjusts the rule's unit
test case.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Simply send the error's default message to the invoking context.
|
| | | | | | | | | |
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
discord.py's default error messages are quite descriptive already so
there really isn't a need to write our own. Therefore, the log calls
were removed so that the generic debug log message is used in the
on_command_error.
In addition to handling missing bot permissions, missing bot roles are
also handled. The message doesn't specify which because it doesn't
really matter to the end-user. The logs will use the default error
messages as described above, and those will contain the specific roles
or permissions that are missing.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
The log level is debug for most errors and it's mainly useful for
precisely that - debugging. This is why some "useless" errors are also
logged e.g. CommandNotFound. Unexpected errors and some API errors will
still have higher levels.
* Add a single log statement to the end of the handler to cover
UserInputError, CheckFailure, and CommandNotFound (when it's not
trying to get a tag)
* Log 404s from API
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Simply send the error message with the help command.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Send a message specifying the parameter name, the converters used, and
the last error message from the converters.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Send a message specifying the error reason.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Send a message indicating which argument is missing.
|
| | | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Import the errors module and qualify the error types with it rather than
importing a large list of error types.
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | |_|_|_|/
| | |/| | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
It could have caused some errors if the user delete his own message
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Unicode literals aren't really safe compared to code points
|
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Two functions were created: send_eval and continue_eval, in order to facilitate testing. The corresponding tests are also changed in this commit.
|
| |\| | | | | | |
|
| | |/ / / / /
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
NGINX has been dockerised, and proxy passes now reference internal container domains rather than referencing host or external domains.
This will have a few extra benefits:
- Less external factors involved for resolving the service address
- Can work with the same address on development envs
- Snekbox can be closed down entirely so it's inaccessible from external networks.
|
| | |\ \ \ \ \
| | |_|_|_|/
| |/| | | | |
Stop scheduling expiration of permanent infractions on edit
|
| | |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
https://github.com/python-discord/bot/issues/751
The infraction edit command defined in `bot.cogs.moderation.management` contained a bug causing it to attempt to schedule an expiration task when turning a temporary infraction into a permanent infraction. Since the "expires_at" field of a permanent infractions is `None`, this caused an exception to occur in the scheduler:
Traceback (most recent call last):
File "/bot/bot/cogs/moderation/scheduler.py", line 415, in _scheduled_task
expiry = dateutil.parser.isoparse(infraction["expires_at"]).replace(tzinfo=None)
File "/usr/local/lib/python3.7/site-packages/dateutil/parser/isoparser.py", line 37, in func
return f(self, str_in, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/dateutil/parser/isoparser.py", line 134, in isoparse
components, pos = self._parse_isodate(dt_str)
File "/usr/local/lib/python3.7/site-packages/dateutil/parser/isoparser.py", line 208, in _parse_isodate
return self._parse_isodate_common(dt_str)
File "/usr/local/lib/python3.7/site-packages/dateutil/parser/isoparser.py", line 213, in _parse_isodate_common
len_str = len(dt_str)
TypeError: object of type 'NoneType' has no len()
I have solved this by adding a check that makes sure we only schedule an expiration task when the `"expires_at"` field has a truthy value (which all valid datetime strings are) using `if request_data['expires_at']`.
IMPORTANT NOTE: While it's tempting to just skip the entire scheduling block for permanent infractions, it's essential to unschedule existing expiration tasks for this infraction as we're changing a temporary infraction to a permanent infraction.
This commit closes #751
|
| | |\ \ \ \
| | | | | |
| | | | | | |
Fix pagniation module for "last page" reaction
|
| | |/ / / /
| | | | |
| | | | |
| | | | | |
Fixes #746.
|
| | |\ \ \ \
| | | | | |
| | | | | | |
Separate message/embed deletion and reaction deletion emojis
|
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
It could be confused with the delete reaction. Clearing reactions
manually is rarely a useful feature anyway.
|