* Bump discord.py, but to the git version for now
* Import GuildConverter from d.py and deprecate our implementation
* Import PartialMessageConverter in our commands extension
* Use newly added `Cog.has_error_handler()` rather than private method
* Update snowflake regex to use 20 as max length
See Rapptz/discord.py#6501
* Use new supported way for custom cooldown buckets
* Include group args in command signature
* Update code to use `Client.close()` over `Client.logout()`
* Add StageChannelConverter and StoreChannelConverter
* Fix AttributeError in licenseinfo
[Core] Data Deletion And Disclosure APIs
- Adds a Data Deletion API
- Deletion comes in a few forms based on who is requesting
- Deletion must be handled by 3rd party
- Adds a Data Collection Disclosure Command
- Provides a dynamically generated statement from 3rd party
extensions
- Modifies the always available commands to be cog compatible
- Also prevents them from being unloaded accidentally
* lets reduce config calls here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Lets normalize how we name config attributes across the bot.
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* ....
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* stop using `bot.guilds` in `on_command_add`
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* missed this one
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* nothing to see here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* lets reduce config calls here
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Just a tiny PR improving config call in a lot of places (Specially events and Help)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* stop using `bot.guilds` in `on_command_add`
* missed this one
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* welp
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Update redbot/cogs/mod/kickban.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/cogs/filter/filter.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* make all large loops async to avoid blocking larger bots
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* ...
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* okay now working AsyncGen
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* may or may not have forgotten black
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack's review
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* DOCS
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* DOCS
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* jack
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
* Apply suggestions from code review
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/core/utils/__init__.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* Update redbot/core/utils/__init__.py
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
* avoid loop if possible and if not only iterate once
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
This is a safety measure to prevent accidentally passing a model which has the same name as another model, potentially modifying rules for the unwanted one.
API changes:
- Cogs must now inherit from `commands.Cog` (see #2151 for discussion and more details)
- All functions which are not decorators in the `redbot.core.checks` module are now deprecated in favour of their counterparts in `redbot.core.utils.mod`. This is to make this module more consistent and end the confusing naming convention.
- `redbot.core.checks.check_overrides` function is now gone, overrideable checks can now be created with the `@commands.permissions_check` decorator
- Command, Group, Cog and Context have some new attributes and methods, but they are for internal use so shouldn't concern cog creators (unless they're making a permissions cog!).
- `__permissions_check_before` and `__permissions_check_after` have been replaced: A cog method named `__permissions_hook` will be evaluated as permissions hooks in the same way `__permissions_check_before` previously was. Permissions hooks can also be added/removed/verified through the new `*_permissions_hook()` methods on the bot object, and they will be verified even when permissions is unloaded.
- New utility method `redbot.core.utils.chat_formatting.humanize_list`
- New dependency [`schema`](https://github.com/keleshev/schema)
User-facing changes:
- When a `@bot_has_permissions` check fails, the bot will respond saying what permissions were actually missing.
- All YAML-related `[p]permissions` subcommands now reside under the `[p]permissions acl` sub-group (tbh I still think the whole cog has too many top-level commands)
- The YAML schema for these commands has been changed
- A rule cannot be set as allow and deny at the same time (previously this would just default to allow)
Documentation:
- New documentation for `redbot.core.commands.requires` and `redbot.core.checks` modules
- Renewed documentation for the permissions cog
- `sphinx.ext.doctest` is now enabled
Note: standard discord.py checks will still behave exactly the same way, in fact they are checked before `Requires` is looked at, so they are not overrideable.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* This starts setting up checks.py to handle managed permission overrides
* A decent starting point, more work to come
* missing else fix
* more work on this
* reduce redundant code
* More work on this...
* more progress
* add a debug flag to some things in .resolvers to help with exploring why checks behave in a certain way
* modify this to be a list for ease of showing full resolution order
* more
* don't bypass is_owner, ever
* remove old logic about ownercommands
* better handling of chec validity
* anonymous functions return None for __module__, remove some code as a result
* mutable default bind fix
* Add a caching layer (to be invalidated as needed)
Ensure checks in the chain inserted before the core logic only return None or False
(whitelists then blacklists are checked first in core logic, from most to least specific scope, overriding this with an allow does not make sense)
* more progress, slow work as I have time
* Modifies the predicates so that their inner functions are accesible from cogs without
being a check
* Update checks.py
Safety for existing permissions.py cogs
* This is where I take a change of course on setting this up,
because this would have been the most long winded interactive command ever as
it was starting to progress.
This is going to support individual entry updates, settings from yaml, gettings, and clearing existing settings
as well as printing a settings template out and referring people to what is going to be very well written docs
* block permissions cog from being unblocked by the permissions cog as a safety feature (really, co-owner exists at this point)
* WIP
* Okay, this has the intent of the changes, just to actually test these as working as intended + add corresponding guild functions
* oh nice, missed a couple files, sec...
* WIP, also, something's broken in resolvers or check_overrides >>
* This is working now (still needs docs and more...)
* unmerge changes from other PR
* is_owner still needs to exist in here due to management of non checked commands
* Update this to new style standards
* forgot to commit some local changes earlier
* fix update logic
* fix update logic
* b14 fix, lol
* fix issue with management command name
* this isnt a real fix
* Ok..
* perms
* This is working, but needs docs and more configuration opts now
* more
* Ux functions, need testing
* style
* fix using the obj str rather than the id
* fix CogOrCommand converter
* Return the correct things in the converter
* last fix, needs docs, and possibly some extra Ux utils
* start doc writing
* extra user facing commands
* yaml docs
* yaml fix
* secondary checks-fix
* 3rd party check stuff
* remove warning that this isn't ready yet
* swap ctx.tick for real responses, require emoji perms for interactive menuing, better attr handling for nicknames
* send file to author
* alias to `p`
* more ctx tick removal
(This is a long ass changelog...)