| Commit message (Collapse) | Author | Age | Lines |
| ... | |
| | | |
| | |
| | |
| | |
| | | |
Addresses reviews from MarkKoz
Co-authored-by: Mark <[email protected]>
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We now filter guild invites the following way:
- Whitelisted invites are always permitted.
- Blacklisted invites are never permitted.
- If the invite is not blacklisted, it is permitted only if it is a
Verified or a Partnered server, otherwise not.
This strategy was decided on during the June 7th staff meeting, see
https://github.com/python-discord/organisation/issues/261
|
| | | |
| | |
| | |
| | |
| | | |
We want to support deletion of both IDs and guild invites, so we need a
bit of special handling for that.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We will now validate and convert any standard discord server invite to a
guild ID, and automatically add the name of the server as a comment.
This will ensure that the list of whitelisted guild IDs will be readable
and nice.
This also makes minor changes to list output aesthetics.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
This gives easier access to the Guild ID in the place where you're most
likely to want to use the whitelist command.
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Also updates the tests for this cog.
|
| | | |
| | |
| | |
| | |
| | | |
Instead of fetching the guild invite IDs from config-default.yml, we
will now be using the AllowDenyList cache to check these.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
This includes commands to add, remove and show the items in the
whitelists and blacklists for the different list types.
Commands are limited to Moderators+.
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Instead of just dumping the JSON response from the site, we'll build a
data structure that it will be convenient to access from our new cog,
and from the Filtering cog.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Currently, some types of errors are returning plain strings that repeat
the input (which can be exploited to deliver stuff like mentions), and
others are returning generic messages that don't give any exception
information.
This commit unifies our approach around putting as much information as
we can (including the exception message), but always putting it inside
an embed, so that stuff like pings will not fire.
This, combined with the 1.4.0a `allowed_mentions` functionality, seems
like a reasonable compromise between security and usability.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We'll use this to ensure the input is valid when people try to whitelist
or blacklist stuff. It will fetch its data from an Enum maintained on
the site, so that the types of lists we support will only need to be
maintained in a single place, instead of duplicating that data in the
bot and the site.
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We shouldn't be making an API call for every single message posted, so
what we're gonna do is cache the data in the Bot, and then update the
cache whenever we make changes to it via our new AllowDenyList cog.
Since this cog will be the only way to make changes to this, this level
of lazy caching should be enough to always keep the cache up to date.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We're making good use of d.py's tasks framework. RedisCache is used to
persist the reminder message ids, which can conveniently be converted
into timestamps.
It is therefore trivial to determine the time to sleep before the first
ping. After that, the bot simply pings every n hours.
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | | |
Allows referencing the constants within the message bodies.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Turns out that it's necessary to cancel the task manually. Otherwise,
duplicate tasks can be running concurrently should the extension
be reloaded.
|
| | | |
| | |
| | |
| | | |
Cog is getting large so let's allow collapsing related bits.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | | |
Let's only use this function to check on the guild status. It can be
exposed via a command in the future.
Name adjusted to be more accurate w.r.t. Discord terminology.
|
| | | |
| | |
| | |
| | | |
This will be used to guard the call to `_kick_members`.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
See docstring for details. The coroutine will be registered as a task
at a later point.
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | | |
Let's access these via the qualified name. The amount of imported names
was starting to get unwieldy.
|
| | | | |
|
| | | | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Let's give it a better name so that it's clear when this message is
sent. The initial words are adjusted to avoid repetition after the
on join message.
|
| | |/
|/|
| |
| |
| | |
This message will be sent via direct message to each user who joins
the guild.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds a little bit of logic to the Help Channel `init_available`
coroutine, which runs when the cog loads. This ensures that if there are
more help channels in available than there should be, we remove the
superfluos ones.
Previously, if the bot started with too many channels, it would maintain
and defend that excessive amount. This is because we never actually
count the number of channels before adding in new available channels
whenever one disappears.
If we ever get too many available channels in the future, this can be
solved by simply reloading this cog.
|
| |\ \
| | |
| | | |
Change regex so it catches new discord URL
|
| | | |
| | |
| | |
| | | |
requested by lemon
|
| | | | |
|
| | | | |
|