| Commit message (Collapse) | Author | Age | Lines |
|\ |
|
| | |
|
| |
| |
| |
| | |
Co-authored-by: GDWR <[email protected]>
|
| |
| |
| |
| | |
Co-authored-by: GDWR <[email protected]>
|
| | |
|
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| | |
It's not used anywhere and hasn't been for a very long time.
|
| | |
|
| |
| |
| | |
Co-authored-by: Xithrius <[email protected]>
|
| |
| |
| | |
Co-authored-by: Xithrius <[email protected]>
|
| |\ |
|
| | | |
|
| | | |
|
| |/
|/| |
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Dynamic views for command help embeds
Adds views for commands to navigate groups.
For subcommands, a button is added to show the parent's help embed.
For groups, buttons are added for each subcommand to show their help embeds.
The views are not generated when help is invoked in the context of an error.
|
| |\| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Don't Exit Token Filtering Early On URLs
The token filtering function would exit early if it detected a URL
within the message, but it made no extra checks to ensure there weren't
other tokens within that message that would trigger it. This made
sense when the filtering logic was written, but it's been modified since
to introduce this bug.
Regression tests included.
Signed-off-by: Hassan Abouelela <[email protected]>
* Links Advisory In Token Filter Tests
Adds a link to the advisory with reasoning for the existence of the
test.
Signed-off-by: Hassan Abouelela <[email protected]>
|
| | |
| | |
| | | |
Migrate to `og_blurple`
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Move to timezone aware datetimes
With the shift of the discord.py library to timezone aware datetimes, this commit changes datetimes throughout the bot to be in the UTC timezone accordingly.
This has several advantages:
- There's no need to discard the TZ every time the datetime of a Discord object is fetched.
- Using TZ aware datetimes reduces the likelihood of silently adding bugs into the codebase (can't compare an aware datetime with a naive one).
- Our DB already stores datetimes in UTC, but we've been discarding the TZ so far whenever we read from it.
Specific places in the codebase continue using naive datetimes, mainly for UI purposes (for examples embed footers use naive datetimes to display local time).
* Improve ISODateTime converter documentation
Co-authored-by: Kieran Siek <[email protected]>
|
| |\| |
|
| | |\ |
|
| | | | |
|
| |\ \ \
| | | |/
| | |/| |
|
| | |\ \ |
|
| | |\ \ \ |
|
| | |\ \ \ \ |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
avatar can apparently be none, which means traceback and a very sad akarys
|
| | | | | | | |
|
| | | |_|_|/
| | |/| | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Since the Discord.py repository has been archived, we can switch to the latest commit of 2.0a0, knowing no breaking change will occur (still pinned to the commit just in case).
This commits fixes any problem related to the migration:
- New avatar interface
- TZ aware datetimes
- Various inernal API changes
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Was discussed with Mr.Webscale (joe), Xithrius in dev-voice
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit updates the test in accordance with 0b35f2a and 0c5561d.
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Pass all 3 cases of text shortening to the test case and test them, the cases being:
i. If the message is just one word, then shorten to 50 characters.
ii. Maximum lines being 3.
iii. Maximum characters being 300.
This commit also removes a misc bug, of passing self, while asserting equal.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
In short, I have written two tests, one which tests the whether `extract_message_links` is called on message edits or not. And the second one to test the regex of `extract_message_links` and assert the message link embeds sent by it.
Special thanks to kwzrd💜#1198 for helping me out with it.
|
| | | | | | |
|
| | | | | | |
|
| | |/ / /
| |/| | | |
|
|\ \ \ \ \
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | | |
# Conflicts:
# bot/converters.py
# bot/exts/info/tags.py
# tests/bot/test_converters.py
|
| |\ \ \ \
| | | |_|/
| | |/| | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
There's now always one blank line (no more, no less) after an import
|