| Commit message (Collapse) | Author | Age | Lines |
... | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
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
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
The arguments are now parsed by the command itself so the test would only
check if the mocked message was passed in.
The only case where the errors would fail would be a change to the passed args,
so it'd only restrict development as the tests would need to be changed anyway
|
| | |\ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
# Conflicts:
# bot/converters.py
# bot/exts/backend/error_handler.py
# bot/exts/info/source.py
# tests/bot/test_converters.py
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
The converter was now only used to restrict requested names which
can be handled by not matching a tag in the cog and not displaying output,
this allows us to be a bit more generous with tag names during the command
fallback when a name with invalid symbols is parsed after a group
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Unnecessary invoked with mocks were removed and some more checks added for
the new behaviour
|
| | | | | | | | | | |
|
| | |_|_|_|_|_|/ /
| |/| | | | | | | |
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
* 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]>
|
| |\ \ \ \ \ \ \
| | | |_|_|_|/ /
| | |/| | | | | |
|
| | |\ \ \ \ \ \
| | | | |_|/ / /
| | | |/| | | | |
|
| | | |\ \ \ \ \ |
|
| | | | |_|_|/ /
| | | |/| | | | |
|
| | |\ \ \ \ \ \
| | | | |/ / / /
| | | |/| | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
There's now always one blank line (no more, no less) after an import
|
| | | |/ / / / |
|
| | |\| | | | |
|
| | | |\ \ \ \ |
|
| | | | | | | | |
|
| | | | | |/ /
| | | | |/| |
| | | | | | |
| | | | | | |
| | | | | | | |
The util attaches an error logging callback instead of relying on python's
exception logging which only occurs when the task is destroyed
|
| | | |/ / / |
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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
|
| |/ / / |
|
| |\ \ \ |
|
| | | | | |
|
| | |\ \ \ |
|
| | | | | | |
|
| | | | | | |
|
| | |/ / /
| |/| | | |
|
| |\ \ \ \ |
|
| | |\| | | |
|
| | | | | | |
|
| | | |_|/
| | |/| | |
|
| | | | | |
|
| | | | | |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The anti-spam cog now uses a cache instead of reading channel history.
The cache is for all channels in the guild, and does not remove deleted messages.
That means that the anti-spam logic now works cross-channel and counts deleted messages.
The size of the cache is determined via a new field in the config YAML file.
The cache was implemented as a separate class, MessageCache, which uses circular buffer logic.
This allows for constant time addition and removal form either side, and lookup. The cache does not support removal from the middle of the cache.
The cache additionally stores a mapping from message ID's to the index of the message in the cache, to allow constant time lookup by message ID.
The commit additionally adds accompanying tests, and renames `cache.py` to `caching.py` to better distinguish it from the new `message_cache.py` and convey that it's for general caching utilities.
|
| |\ \ \ |
|
| | |\| | |
|
| | | |\ \ |
|