| Commit message (Collapse) | Author | Age | Lines |
... | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
The channel scope settings were changed to accomodate strings. That means that if a string is specified, the bot will look whether the context channel's name matches. If it's a number, it will match the ID.
Accordingly the same changed was applied to the bypass roles and pings settings: if it's a non-numeric string, it will look for a role with that name.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This commit provides the basis of the new filtering system:
- The filtering cog consists of several filter lists loaded from the database (filtering.py).
- Each filter list contains a list of filters, which are run in response to events (message posting, reaction, thread creation). Each filter list may choose to respond to different events (the subscribe method in filtering.py).
- Each filter has settings (settings.py) which decide when it is going to be run (e.g it might be disabled in a specific channel), and what will happen if it triggers (e.g delete the offending message).
- Not every filter has a value for every setting (the _settings_types package) . It will use the default settings specified by its filter list as a fallback.
- Since each filter might have a different effect when triggered, we must check all relevant filters even if we found a triggered filter already, unlike in the old system.
- Two triggered filters may specify different values for the same setting, therefore each entry has a rule for combining two different values (the __or__ method in each file in _settings_types).
To avoid having to prefix each file with an underscore (or the bot will try to load it as a cog), the loading script was changed to ignore packages with names starting with an underscore.
Alert sending is done via a webhook so that several embeds can be sent in the same message (will be useful for example for guild invite alerts).
Filter lists and setting entries classes are loaded dynamically from their respective packages.
In order to be able to test the new features, this commit also includes a migration of the regex-based filtering.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Tests and dependent functionality in other extensions will be re-added later on.
|
|\ \ \ \ \ \
| | |_|_|_|/
| |/| | | | |
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
# Conflicts:
# bot/constants.py
# bot/exts/utils/snekbox/_cog.py
# config-default.yml
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: wookie184 <[email protected]>
|
| | |\ \ \ \ \
| | | | |_|_|/
| | | |/| | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The value 2 represents the `COMPLETED_ONBOARDING` flag, found here
https://discord.com/developers/docs/resources/guild#guild-member-object-guild-member-flags
|
| | | |\ \ \ \ |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
+ used both `discord.User` and `discord.Member` in typehinting as `InteractionResponse.user` returns `discord.User` object
+ removed `ErrorHandler()._can_run`
+ edited `try_get_tag` to use `bot.can_run`
+ removed `/tag list`
+ change `/tag get <name>` to `/tag <name>`
+ remove redundant `GUILD_ID` in `tags.py`
+ using `discord.abc.Messageable` because `ctx.channel` returns that instead of `Channel` Object
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
+ Remove commented code
+ Remove unecessarily syncting the bot
+ Handle direct tag commads
+ 3.10 type hinting in concerned functions
+ Add `MockInteractionMessage`
+ Fix tests for `try_get_tag`
|
| | | | | | | | |
|
| | |\| | | | | |
|
| | |\ \ \ \ \ \ |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| |\ \ \ \ \ \ \ \
| | | |_|/ / / / /
| | |/| | | | | | |
|
| | | | | | | | | |
|
| | | | | | | | | |
|
| | |_|/ / / / /
| |/| | | | | | |
|
| |_|_|/ / / /
|/| | | | | | |
|
| |/ / / / /
|/| | | | | |
|
|/ / / / / |
|
|\ \ \ \ \ |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | |_|_|/
| |/| | | |
|
| |/ / / |
|
|/ / / |
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | | |
This is need due to the new behaviour of discord.utils.get supporting both iterables and async iterables by checking for the presence of the __aiter__ attr on the iterable.
GuildChannelConverter._resolve_channel uses this get util under the hood which grabs the voice channels on the guild, which were previously Mocked by the MagicMock, meaning the __aiter__ attr was present, causing the util to think it should be ran asynchronously.
|
| |\ \ |
|