* Use aware objects instead of naive ones
* Use aware objects when storing and reading UTC timestamps
* Remove unneeded parentheses
* Fixed naive and aware objects unable to be compared here
* Address feedback
* Fix the newly added `modlog.create_case()` calls
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
[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
* add toggle to allow switching off sending the name of the person who uhhh used? the warning
* the Kowlin way of life
* reduced config calls to stay in line with #3766 and hopefully didn't break anything (as per Draper suggestion)
* more performance magic
* found an error + black
* forgot warning channel existed
* await... seriously... how long have you done async stuff now dav?
* unify (most) config calls in ``[p]warn``
* fix all the things
* Unwarn now able to have a reason
* black
* Update string to say Run instead of Do
Co-Authored-By: Draper <27962761+Drapersniper@users.noreply.github.com>
* Make error for unregistered reason less agressive
Co-Authored-By: Draper <27962761+Drapersniper@users.noreply.github.com>
* Removing unneccessary lines and not putting the user input through the translator.
* Because black hates me, here black formatting with adjusted line length
* Trigger CI
* Now always sendes a message when an invalid reason is passed, not only if the command author was an admin, guild owner or bot owner.
* That should do the trick
* Correct
* Make Reason optional
Co-Authored-By: jack1142 <6032823+jack1142@users.noreply.github.com>
Co-authored-by: Draper <27962761+Drapersniper@users.noreply.github.com>
Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
* new code
Added the admin check to warnings and removed the part where the user could check themselves.
Added new mywarns which replaces part of the old behaviour of warn
* Update warnings.py
* Create 2900.enhance.rst
* Fixed command name
Because appearently I can't remember a command for 10 seconds
* Commands in backticks
Put command names in changelog in double backticks after being advised to do so in discord
* made user not optional, and the other thing sinbad requested
* switched parts. magic
resolves#2900
* PostgreSQL driver and general drivers cleanup
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Make tests pass
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Add black --target-version flag in make.bat
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Rewrite postgres driver
Most of the logic is now in PL/pgSQL.
This completely avoids the use of Python f-strings to format identifiers into queries. Although an SQL-injection attack would have been impossible anyway (only the owner would have ever had the ability to do that), using PostgreSQL's format() is more reliable for unusual identifiers. Performance-wise, I'm not sure whether this is an improvement, but I highly doubt that it's worse.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Reformat
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Fix PostgresDriver.delete_all_data()
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Clean up PL/pgSQL code
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* More PL/pgSQL cleanup
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* PL/pgSQL function optimisations
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Ensure compatibility with PostgreSQL 10 and below
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* More/better docstrings for PG functions
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Fix typo in docstring
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Return correct value on toggle()
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Use composite type for PG function parameters
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Fix JSON driver's Config.clear_all()
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Correct description for Mongo tox recipe
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Fix linting errors
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Update dep specification after merging bumpdeps
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Add towncrier entries
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Update from merge
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Mention [postgres] extra in install docs
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Support more connection options and use better defaults
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Actually pass PG env vars in tox
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Replace event trigger with manual DELETE queries
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* [i18n] Update translation catalogs
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Install redgettext 3.1 in travis crowdin deployment
Last time the catalog templates were updated, redgettext 3.0 was used. I'd rather Travis didn't upload them after extracting with an older version.
Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
* Add respectable aliases for consistency
* General command name for alias.py
* Forgot one for alias
* General command for filter
* General command for warnings
* Whoops
Resolves#1749