aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/moderation/clean.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/bot/exts/moderation/clean.py b/bot/exts/moderation/clean.py
index 65ffec88b..9001b4fe2 100644
--- a/bot/exts/moderation/clean.py
+++ b/bot/exts/moderation/clean.py
@@ -21,12 +21,14 @@ from bot.utils.channel import is_mod_channel
log = logging.getLogger(__name__)
+# Default number of messages to look at in each channel.
DEFAULT_TRAVERSE = 10
+# Number of seconds before command invocations and responses are deleted in non-moderation channels.
MESSAGE_DELETE_DELAY = 5
-# Type alias for checks
+# Type alias for checks for whether a message should be deleted.
Predicate = Callable[[Message], bool]
-
+# Type alias for message lookup ranges.
CleanLimit = Union[Message, Age, ISODateTime]
@@ -56,7 +58,7 @@ class Regex(Converter):
raise BadArgument(f"Regex error: {e.msg}")
-if TYPE_CHECKING:
+if TYPE_CHECKING: # Used to allow method resolution in IDEs like in converters.py.
CleanChannels = Union[Literal["*"], list[TextChannel]] # noqa: F811
Regex = re.Pattern # noqa: F811