| Commit message (Collapse) | Author | Lines |
|
If the code ran to the last line of the function without returning
(we return when we send a tag)
It means we didn't send the tag and need to return False
|
|
|
|
After CommandError was catched, the embed was sent,
now we return after the exception was catched
Modified the way raw_commands are collected
|
|
|
|
|
|
|
|
the CommandError exception was ignored,
We now catch the exception to handle and log the event
Also added a little code reformat
|
|
|
|
|
|
|
|
|
|
|
|
command context.
|
|
|
|
|
|
|
|
The message sent when suggesting a command is now wrapped inside an embed
|
|
|
|
|
|
get_command was changed to - display_tag, the name didn't fit,
since its not the command itself.
command_on_cooldown was taken out of display_tag to get the option to reuse it in another scope
Docstrings modified
|
|
|
|
The returned value was changed from True to False
If we didn't return True (sent the tag) throughout the code
It means we didn't send anything, we should return False
|
|
|
|
|
|
|
|
|
|
When found a similar command, the bot sent a suggestion about the full command name
This was fixed by saving the matching alias and sending it instead of sending the full command name
|
|
preventing message spam by the bot when commands are misspelt
|
|
Since its used to get the input of the command, its not needed again
In the function (callback) call
|
|
Migration to error_handler.py
Suggesting misspelt commands, in progress
|
|
Updated
|
|
|
|
|
|
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.
|
|
|
|
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
|
|
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
|
|
Fixes #746.
|
|
It could be confused with the delete reaction. Clearing reactions
manually is rarely a useful feature anyway.
|
|
|
|
|
|
|
|
After the wiki pages adjustment to the resources page, these two urls are needing to be updated to point to the new correct locations for each page.
Tools will be under resources, and Asking Good Questions is a guide, so will be under Guides.
|
|
- Added regex back to sub and split by non-alphabet.
- Now use two pointers to move from words to words.
|
|
|
|
- Since it is returning as soon as there are suggestions found for a threshold, this will give a better reflection of what the bot thinks user is searching for.
|
|
- Added a regex to remove non-alphabet ( `[^a-z]` with `re.IGNORECASE` )
|