aboutsummaryrefslogtreecommitdiffstats
path: root/tests/helpers.py (unfollow)
Commit message (Collapse)AuthorLines
2021-08-28Add checkmark after command completes in mod channelsGravatar mbaruh-1/+4
2021-08-28Refactor code, correct loggingGravatar mbaruh-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.
2021-08-28Rename "amount" argument to "traverse"Gravatar mbaruh-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.
2021-08-28Change cache usageGravatar mbaruh-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.
2021-08-27Don't delete clean cancel embed in mod channelGravatar mbaruh-1/+4
2021-08-27Change `from-to` primary name to `between`Gravatar mbaruh-2/+2
2021-08-27Correct logging commentGravatar mbaruh-1/+1
2021-08-27Move setting cleaning flag to correct lineGravatar mbaruh-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.
2021-08-27Move clean logging to a helper functionGravatar mbaruh-11/+11
2021-08-27Moved clean cog to moderation extGravatar mbaruh-0/+0
The cog is moderation related and all commands are exclusive to moderators.