diff options
| author | 2021-11-01 17:16:05 +0000 | |
|---|---|---|
| committer | 2021-12-01 01:10:40 +0000 | |
| commit | edb18d5f5be3d1dfcfdcfa72bcbf0915e321b895 (patch) | |
| tree | ef7e7218375fedd0af80b329155bd30dd5bb40d7 | |
| parent | Merge pull request #1981 from python-discord/bsoyka/rules-shortening-space (diff) | |
Add thread archive time enum to constants
Diffstat (limited to '')
| -rw-r--r-- | bot/constants.py | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/bot/constants.py b/bot/constants.py index 36b917734..93da6a906 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -683,10 +683,22 @@ class VideoPermission(metaclass=YAMLGetter):      default_permission_duration: int +class ThreadArchiveTimes(Enum): +    HOUR = 60 +    DAY = 1440 +    THREE_DAY = 4230 +    WEEK = 10080 + +  # Debug mode  DEBUG_MODE: bool = _CONFIG_YAML["debug"] == "true"  FILE_LOGS: bool = _CONFIG_YAML["file_logs"].lower() == "true" +if DEBUG_MODE: +    DEFAULT_THREAD_ARCHIVE_TIME = ThreadArchiveTimes.HOUR.value +else: +    DEFAULT_THREAD_ARCHIVE_TIME = ThreadArchiveTimes.WEEK.value +  # Paths  BOT_DIR = os.path.dirname(__file__)  PROJECT_ROOT = os.path.abspath(os.path.join(BOT_DIR, os.pardir))  |