aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar mbaruh <[email protected]>2021-10-25 22:07:22 +0300
committerGravatar mbaruh <[email protected]>2021-10-25 22:07:22 +0300
commitcae048338aa31a6c9c12a75e2f7f1674d817ce7f (patch)
tree555798dd132faebaa429fb83854dbea66637622a
parentApply requested style changes (diff)
Improve documentation of global variables
-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