aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| * | | | Bumps Pip LicencesGravatar Hassan Abouelela2021-10-22-88/+95
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Updates the pip-licences version to fix a breaking bug in the currently pinned version. Signed-off-by: Hassan Abouelela <[email protected]>
| | * | Improve documentation of global variablesGravatar mbaruh2021-10-25-3/+5
| | | |
| | * | Apply requested style changesGravatar mbaruh2021-10-25-6/+4
| | | |
| | * | Adjust docstring to #1876Gravatar mbaruh2021-10-25-12/+11
| | | |
| | * | Merge branch 'main' into cleanreworkGravatar mbaruh2021-10-17-1144/+1955
| | |\ \
| | * | | Indentation, type-hint, and documentation fixesGravatar mbaruh2021-09-20-31/+32
| | | | |
| | * | | End clean on unexpected errorsGravatar mbaruh2021-09-11-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | Added a cog_command_error method that sets cleaning to False when a command ends on an exception. I don't have anything in mind that might cause this, but it will ensure that in any case the cog will still be usable.
| | * | | Handle Regex converter errorsGravatar mbaruh2021-09-11-8/+13
| | | | | | | | | | | | | | | | | | | | Handle cases where there are no enclosing backticks, and where the regex pattern is invalid.
| | * | | Fix incorrect cache usageGravatar mbaruh2021-09-08-1/+1
| | | | |
| | * | | Switch `users` and `traverse` in main commandGravatar mbaruh2021-09-08-2/+2
| | | | | | | | | | | | | | | | | | | | When providing a user ID it would clash with `traverse` which came first.
| | * | | Fix delete orderGravatar mbaruh2021-09-07-9/+14
| | | | | | | | | | | | | | | | | | | | | | | | | In case of old messages, it would delete the old messages first, and only then bulk delete the remainder, which affected logging. This commit corrects the deletion order.
| | * | | Improve responsesGravatar mbaruh2021-09-07-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Tells the user if clean cancel was attempted with no ongoing clean. - Fixes MaxConcurrencyReached call bug. There was a missing argument, and it shouldn't invoke the help embed anyway, so it's now a message. - Some code refactoring.
| | * | | Fix regex searchGravatar mbaruh2021-09-07-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The regex was lowercased, even though regex patterns are case sensitive. Also adds the DOTALL flag.
| | * | | Code and comments polishGravatar mbaruh2021-09-07-25/+21
| | | | | | | | | | | | | | | | | | | | Co-authored-by: Shivansh-007 <[email protected]>
| | * | | Changed regex formatting to wrapped in backticksGravatar mbaruh2021-08-31-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After discussion, backticks seems like the preferrable formatting as it also cancels Discord's formatting. Additionally removed the Optionals from the last args in the commands, to not silently ignore incorrect input.
| | * | | Disallow time range cleaning in multiple channelsGravatar mbaruh2021-08-31-0/+4
| | | | | | | | | | | | | | | | | | | | Cleaning in the same time range across several channels seems like an arbitrary decision.
| | * | | Added master commandGravatar mbaruh2021-08-29-74/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The subcommands are kept simple and with few arguments, as they deal with most cases and their usage shouldn't be cumbersome. However we might to clean by criteria of several functionalities offered by the subcommands, for example delete a specific user's messages but only those that contain a certain pattern. For this reason the top-level command can now accept all arguments available in any of the subcommands, and will combine the criteria. Because the channels list has to be the last argument in order to accept either a list of channel or "*", I had to force a specific pattern in the regex argument for it to not consume the first channel specified. The regex argument must now have an "r" prefix and be enclosed in single quotes. For example: r'\d+'. For patterns with spaces the whole thing still needs to be enclosed in double quotes. For consistency the `clean regex` subcommand was changed to require the same.
| | * | | Handle reacted message being deletedGravatar mbaruh2021-08-29-1/+3
| | | | |
| | * | | Use a cog-wide role checkGravatar mbaruh2021-08-29-8/+4
| | | | |
| | * | | Restrict until and between to a single channelGravatar mbaruh2021-08-29-12/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The subcommands should stay simple and answer the most common use cases. Deleting all messages within a time range across many channels seems esoteric and gives just more room for mistakes.
| | * | | `until` and `between` overhaulGravatar mbaruh2021-08-29-53/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The two subcommands can now accept a time delta and an ISO date time in addition to messages. - The two limits are now exclusive. Meaning cleaning until a message will not delete that message. - Added a separate predicate for the `until` case, as the combination of that command and cache usage would result in incorrect behavior. Additionally, deleting from cache now correctly traverses only `traverse` messages, rather than trying to delete `traverse` messages.
| | * | | Send message when no messages foundGravatar mbaruh2021-08-28-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the clean command to send a message instead of raising BadArgument when no messages are found. Not finding messages is not an error, and doesn't necessarily require the help embed to spring up, just that the parameters might need tweaking.
| | * | | Add checkmark after command completes in mod channelsGravatar mbaruh2021-08-28-1/+4
| | | | |
| | * | | Refactor code, correct loggingGravatar mbaruh2021-08-28-96/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit further splits the bulky _clean_messages function, and all its helper functions are grouped together in the same region. Additionally, this commit fixes logging by logging only the messages that have been successfully deleted, before being possibly interrupted by the cancel command.
| | * | | Rename "amount" argument to "traverse"Gravatar mbaruh2021-08-28-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This name as been confusing moderators for a while now. "amount" sounds like this is the amount of messages that the bot will try to delete, and keep going until it reaches that number. In reality it's the amount of latest messages per channel the bot will traverse. Hopefully the new name conveys that better.
| | * | | Change cache usageGravatar mbaruh2021-08-28-18/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The cache is used only when all channels are used, as before. Unlike before, using all channels requires using "*" in the channels argument. Before all channels would be used if use_cache was set to True. Using all channels uses the cache by default. To traverse every single text channel in the server, setting use_cache to False is required in the command.
| | * | | Don't delete clean cancel embed in mod channelGravatar mbaruh2021-08-27-1/+4
| | | | |
| | * | | Change `from-to` primary name to `between`Gravatar mbaruh2021-08-27-2/+2
| | | | |
| | * | | Correct logging commentGravatar mbaruh2021-08-27-1/+1
| | | | |
| | * | | Move setting cleaning flag to correct lineGravatar mbaruh2021-08-27-2/+1
| | | | | | | | | | | | | | | | | | | | Between the concurrency check and setting the cleaning flag to True there was an await statement, which could potentially cause race conditions.The setting of the flag was moved to right below the concurrency check.
| | * | | Move clean logging to a helper functionGravatar mbaruh2021-08-27-11/+11
| | | | |
| | * | | Moved clean cog to moderation extGravatar mbaruh2021-08-27-0/+0
| | | | | | | | | | | | | | | | | | | | The cog is moderation related and all commands are exclusive to moderators.
| | * | | Merge branch 'main' into cleanreworkGravatar mbaruh2021-08-27-933/+1826
| | |\ \ \
| | * | | | Fix references to kwarg after renaming in clean commandGravatar Chris Lovering2021-07-28-2/+2
| | | | | |
| | * | | | Rely on error handler for sending input errors to userGravatar Chris Lovering2021-07-28-45/+9
| | | | | |
| | * | | | simplify range predicate for clean commandGravatar Chris Lovering2021-07-28-1/+1
| | | | | |
| | * | | | Return empty containers if clean is cancelledGravatar Chris Lovering2021-07-28-2/+2
| | | | | |
| | * | | | Make is_older_than_14d a static methodGravatar Chris Lovering2021-07-26-11/+12
| | | | | |
| | * | | | Update _get_messages_from_channels return typeGravatar Chris Lovering2021-07-26-2/+2
| | | | | |
| | * | | | Merge branch 'main' into cleanreworkGravatar ChrisJL2021-07-26-2344/+5485
| | |\ \ \ \
| | * | | | | document snowflake check betterGravatar Senjan212021-04-16-4/+12
| | | | | | |
| | * | | | | Don't delete invocation in mod channelGravatar Senjan212021-04-16-7/+10
| | | | | | |
| | * | | | | Better response wording, added aliasGravatar Senjan212021-04-16-2/+2
| | | | | | |
| | * | | | | make predicate_range inclusiveGravatar Senjan212021-04-16-1/+1
| | | | | | |
| | * | | | | Naming changes for better self documentationGravatar Senjan212021-04-16-5/+5
| | | | | | |
| | * | | | | simplify use_cache varGravatar Senjan212021-04-16-6/+2
| | | | | | |
| | * | | | | Use correct kwarg for channel.historyGravatar Senjan212021-04-16-1/+1
| | | | | | |
| | * | | | | replace lambda with list in defaultdictGravatar Senjan212021-04-16-2/+2
| | | | | | |
| | * | | | | Merge branch 'main' into cleanreworkGravatar Senjan212021-04-15-2379/+4200
| | |\ \ \ \ \
| | * | | | | | swap predicate save order for correct deletionGravatar Senjan212021-04-15-4/+4
| | | | | | | |