From b3aabb4919cb935236b2e913d497fb3cf240ae5d Mon Sep 17 00:00:00 2001 From: jwansek Date: Wed, 29 May 2024 19:00:00 +0100 Subject: Fixed bug with string formatting --- docker-compose.yml | 4 ++++ subreddit.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 900c7f8..1d68251 100755 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -10,6 +10,8 @@ services: - db-network external_links: - mariadb:mysql + volumes: + - ./config.json:/app/config.json cron: build: context: . @@ -19,6 +21,8 @@ services: - db-network external_links: - mariadb:mysql + volumes: + - ./config.json:/app/config.json networks: db-network: diff --git a/subreddit.py b/subreddit.py index 9fe4088..510771b 100755 --- a/subreddit.py +++ b/subreddit.py @@ -191,9 +191,9 @@ def handle_submission(submission, reddit): else: if score < CONFIG["lambda_cost"]: text = """Thank you for submitting to /r/SmallYTChannel. Unfortunally, you submission has been removed since you do not have enough λ. You need - %iλ to post. You currently have %iλ. For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % score + %iλ to post. You currently have %iλ. For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (CONFIG["lambda_cost"], score) submission.mod.remove() - display("/u/%s had their submission removed for insufficient lambda." % (CONFIG["lambda_cost"], submission.author), concerning=submission.permalink) + display("/u/%s had their submission removed for insufficient lambda." % (submission.author), concerning=submission.permalink) else: text = """Thank you for submitting to /r/SmallYTChannel. You have spent %iλ to submit here, making your current balance %iλ. /u/%s, please comment `!givelambda` to the most helpful advice you are given. -- cgit v1.2.3