From f848558ff6faedf3cf2553c4c1dddfbc3b86f8ed Mon Sep 17 00:00:00 2001
From: jwansek <eddie.atten.ea29@gmail.com>
Date: Wed, 29 May 2024 11:37:38 +0000
Subject: Made the lambda cost a variable parameter

---
 subreddit.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

(limited to 'subreddit.py')

diff --git a/subreddit.py b/subreddit.py
index f600d6f..9fe4088 100755
--- a/subreddit.py
+++ b/subreddit.py
@@ -189,17 +189,17 @@ def handle_submission(submission, reddit):
         else:
             text = "Your post is a discussion, meta or collab post so it costs 0λ."
     else:
-        if score < 3:
+        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
-            3λ 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/)""" % score
             submission.mod.remove()
-            display("/u/%s had their submission removed for insufficient lambda." % submission.author, concerning=submission.permalink)
+            display("/u/%s had their submission removed for insufficient lambda." % (CONFIG["lambda_cost"], submission.author), concerning=submission.permalink)
         else:
-            text = """Thank you for submitting to /r/SmallYTChannel. You have spent 3λ to submit here, making your current balance %iλ.
+            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. 
-            For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (score - 3, str(submission.author))
+            For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (CONFIG["lambda_cost"], score - CONFIG["lambda_cost"], str(submission.author))
             with database.Database() as db:
-                db.change_lambda(str(submission.author), -3)
+                db.change_lambda(str(submission.author), -CONFIG["lambda_cost"])
 
             try:
                 ytid = ytapi.get_videoId_from_url(submission.url)
-- 
cgit v1.2.3