From cabc8b7fb0ecdbe6c00b80ba0b83d395db968c36 Mon Sep 17 00:00:00 2001 From: Slfhstd Date: Sun, 22 Feb 2026 21:36:36 +0000 Subject: [PATCH] Moving config to config folder --- Dockerfile | 2 ++ config.py | 19 ++----------------- config/config.py | 18 ++++++++++++++++++ docker-compose.yml | 2 +- 4 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 config/config.py diff --git a/Dockerfile b/Dockerfile index 1036732..10df08c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ WORKDIR /app COPY config.py . COPY flairtimercomment.py . +RUN mkdir -p /app/config + # Install dependencies RUN pip install --no-cache-dir praw diff --git a/config.py b/config.py index ad7656f..de5e530 100644 --- a/config.py +++ b/config.py @@ -1,18 +1,3 @@ -username = "" -password = "" -client_id = "" -client_secret = "" - -#Subreddits -subreddit = "" # "INEEEEDIT" "Ofcoursethatsathing" "All" - -flair_text = "Waiting for OP" # Case Sensitive - -interval = 30 # How often should the bot scan the subreddit for these posts, in seconds. Higher = slower/less accurate/save resources, lower = faster/more accurate/use more resources. - -hours = 48 # How many hours must the flair been on the post to send the notification - -searchlimit = 600 # Max: 1000, this should only be limited to save on resources. The bot sorts by new and if it isn't catching posts that are being changed to the flair simply because they are too old (say the 301st post on the subreddit is changed to the flair) then increase this limit. +from config.config import * -# Comment message to post on old posts -comment_message = "Hello OP! It has been at least __2 days__ since you last replied to your post. \n\n Please update your post in one of the following ways; \n\n * Reply to any relevant comments you haven't replied to yet. \n * [Mark your post solved](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules), if your issue is fixed.\n\n \n __If you do not update your post within *7 days* you may receive a short ban.__ \n\n _Please note: Deleting this post, without marking it solved, is against [our rules](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules)._ \n" +# shim re-exporting the real config module in config/config.py diff --git a/config/config.py b/config/config.py new file mode 100644 index 0000000..ad7656f --- /dev/null +++ b/config/config.py @@ -0,0 +1,18 @@ +username = "" +password = "" +client_id = "" +client_secret = "" + +#Subreddits +subreddit = "" # "INEEEEDIT" "Ofcoursethatsathing" "All" + +flair_text = "Waiting for OP" # Case Sensitive + +interval = 30 # How often should the bot scan the subreddit for these posts, in seconds. Higher = slower/less accurate/save resources, lower = faster/more accurate/use more resources. + +hours = 48 # How many hours must the flair been on the post to send the notification + +searchlimit = 600 # Max: 1000, this should only be limited to save on resources. The bot sorts by new and if it isn't catching posts that are being changed to the flair simply because they are too old (say the 301st post on the subreddit is changed to the flair) then increase this limit. + +# Comment message to post on old posts +comment_message = "Hello OP! It has been at least __2 days__ since you last replied to your post. \n\n Please update your post in one of the following ways; \n\n * Reply to any relevant comments you haven't replied to yet. \n * [Mark your post solved](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules), if your issue is fixed.\n\n \n __If you do not update your post within *7 days* you may receive a short ban.__ \n\n _Please note: Deleting this post, without marking it solved, is against [our rules](https://www.reddit.com/r/MinecraftHelp/wiki/rules/#wiki_7._points_sytem_rules)._ \n" diff --git a/docker-compose.yml b/docker-compose.yml index 81ff40f..5609fee 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -4,6 +4,6 @@ services: container_name: bot-ftc-dev restart: unless-stopped volumes: - - /docker/data/flairtimercomment:/app + - /docker/data/flairtimercomment:/app/config