| Commit message (Collapse) | Author | Age | Lines |
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |\
| |
| | |
Use `voice_gate_blocked` field from API for voice_gate
|
| |/
|
|
| |
This new field is true when the user has any voice exception, which means the user is blocked from receiving the role.
|
| |
|
|
| |
Update docstring
|
| |\ |
|
| | |\
| |/
|/| |
|
| | | |
|
| | |
| |
| |
| |
| |
| | |
This is caused by an upstream issue with setuptools 60.* (via virtualenv) changeing the default to using the setuptools-embedded distutils rather than the stdlib distutils, which breaks within pip's isolated builds.
This is explained quite well here https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763
|
| | |
| |
| |
| | |
Fixes an issue caused by #1951.
|
| |\ \ |
|
| |/ / |
|
| | |
| |
| |
| | |
These stub commands are useful for moderators during the change over from voice_ban to voice_mute, to remind moderators that the command has been changed now.
|
| | |
| |
| |
| |
| |
| | |
This changes all functions that reference voice_ban to voice_mute instead, which comes with breaking front-end changes.
These front end changes are desirable, so that moderators get used to use voice_mute now, rather than voice_ban, in preparation for when we roll out real voice_bans.
|
| |/
|
|
|
|
| |
This commit changes all of the back-end so that it is in line with the new site API (see this PR https://github.com/python-discord/site/pull/608).
This comes with no changes to commands, or functions definitions.
|
| | |
|
| |\
| |
| | |
Refactor time utilities
|
| | |\
| |/
|/| |
|
| |\ \
| | |
| | | |
Add bot-core as a dependency
|
| | |\ \
| |/ /
|/| | |
|
| |\ \ \
| | | |
| | | | |
Fix pastebin hyperlink to use correct markdown syntax
|
| |/ / /
| | |
| | |
| | |
| | | |
Fix format from `[link](text)` to `[text](link)` so that the link will
be formatted as it should be.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
This moves the regex closer to the place actually using the regex, and removes the need for a regex.py file entirely.
|
| | | | |
|
| |/ / |
|
| | | |
|
| | | |
|
| | |
| |
| |
| | |
They're equivalent for UTC. Get rid of the extra import.
|
| | | |
|
| | |
| |
| |
| | |
It wasn't passing the current time when `other_timestamp` was None.
|
| | | |
|
| | |
| |
| |
| |
| | |
Integers and floats which are 0 are considered valid timestamps, but are
falsy.
|
| | |
| |
| |
| |
| | |
None was returned for two separate cases: permanent infractions and
expired infractions. This resulted in an ambiguity.
|
| | |
| |
| |
| |
| |
| |
| | |
Mock User.created_at and User.joined_at because `arrow.get()` doesn't
work with Mock objects. The old implementation of
`time.discord_timestamp` accepted mocks because it just did `int()` on
any type it didn't explicitly check for.
|
| | | |
|
| | | |
|
| | |
| |
| |
| |
| |
| |
| | |
Remove the need for the caller to create a `relativedelta` from 2
timestamps before calling `humanize_delta`. This is especially
convenient for cases where the original inputs aren't `datetime`s
since `relativedelta` only accepts those.
|
| | |
| |
| |
| | |
There's a saner way to parse the timestamp that relied on this regex.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the burden of conversion from the caller to clean up and simplify
the call sites. Handle timestamp conversions internally with arrow.get.
Remove format_infraction and get_time_delta because they're now
obsolete. Replace the former with discord_timestamp and the latter with
format_relative.
|
| | |
| |
| |
| | |
It's not necessarily tied to infractions anymore.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a delta is given, it is unknown what it's relative to. The function
has to assume it's relative to the POSIX Epoch. However, using a delta
for this would be quite odd, and would more likely be a mistake if
anything.
relativedelta support was broken anyway since it wasn't using the
total seconds represented by the delta.
|
| | |
| |
| |
| |
| |
| | |
First, the `args` attribute doesn't exist on enums. Even if it did, this
check only works if the argument given is an enum member (of any enum).
Such occurrence seems too rare to warrant an explicit check.
|
| | |
| |
| |
| |
| | |
It's not used anywhere. Furthermore, a humanised duration with negative
values wouldn't make sense.
|
| | |
| |
| |
| |
| | |
Use the latter where the former was being called with the relative
format type.
|