aboutsummaryrefslogtreecommitdiffstats
path: root/subreddit.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2024-05-29 11:37:38 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2024-05-29 11:37:38 +0000
commitf848558ff6faedf3cf2553c4c1dddfbc3b86f8ed (patch)
treebe6fc841d91cab209fc3fc04a9078c5a6a3673f2 /subreddit.py
parentea15aa7f5de27495e8246a584be610f72d6ecc8d (diff)
downloadSmallYTChannelBot-f848558ff6faedf3cf2553c4c1dddfbc3b86f8ed.tar.gz
SmallYTChannelBot-f848558ff6faedf3cf2553c4c1dddfbc3b86f8ed.zip
Made the lambda cost a variable parameter
Diffstat (limited to 'subreddit.py')
-rwxr-xr-xsubreddit.py12
1 files changed, 6 insertions, 6 deletions
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)