aboutsummaryrefslogtreecommitdiffstats
path: root/subreddit.py
diff options
context:
space:
mode:
Diffstat (limited to 'subreddit.py')
-rwxr-xr-xsubreddit.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/subreddit.py b/subreddit.py
index c5c9265..5f6c906 100755
--- a/subreddit.py
+++ b/subreddit.py
@@ -115,13 +115,13 @@ def update_tables(scores, data):
REDDIT.subreddit("u_SmallYTChannelBot").submit("/r/SmallYTChannel Statistics: %s" % date, url = imageurl).reply(content).mod.distinguish(sticky = True)
- SUBREDDIT.wiki["lambdatables"].edit(content, reason = "Update: %s" % date)
- SUBREDDIT.wiki[date].edit(content, reason = "Update: %s" % date)
+ #SUBREDDIT.wiki["lambdatables"].edit(content, reason = "Update: %s" % date)
+ #SUBREDDIT.wiki[date].edit(content, reason = "Update: %s" % date)
- currentdata = SUBREDDIT.wiki["index"].content_md
- currentdata += "\n\n* [%s](/r/SmallYTChannel/wiki/%s)" % (date, date)
+ #currentdata = SUBREDDIT.wiki["index"].content_md
+ #currentdata += "\n\n* [%s](/r/SmallYTChannel/wiki/%s)" % (date, date)
- SUBREDDIT.wiki["index"].edit(currentdata, reason = "Update: %s" % date)
+ #SUBREDDIT.wiki["index"].edit(currentdata, reason = "Update: %s" % date)
def upload_image(path, date):
config = {
@@ -195,10 +195,15 @@ def handle_givelambda(comment):
display(text, concerning=comment.permalink)
elif submission.link_flair_text in FREE_FLAIRS:
text = "You cannot give lambda in free posts anymore."
+ display("Giving lambda was rejected due to being a free post", concerning=comment.permalink)
elif op != str(submission.author):
text = "Only the OP can give λ."
elif db.user_given_lambda(parentauthour, str(submission.permalink)):
text = "You have already given /u/%s λ for this submission. Why not give λ to another user instead?" % parentauthour
+ display("Giving lambda was rejected for being the same user", concerning=comment.permalink)
+ elif len(comment.parent().body) < CONFIG["min_comment_len"]:
+ text = "You can no longer give λ to comments that are fewer than %i characters in length. This is to encourage specific, detailed feedback." % CONFIG["min_comment_len"]
+ display("Giving lambda was rejected due to insufficient length", concerning=comment.permalink)
else:
display("'/u/%s' has given '/u/%s' lambda!" % (op, parentauthour), concerning=comment.permalink)
text = "You have given /u/%s 1λ. /u/%s now has %iλ" % (parentauthour, parentauthour, db.get_lambda(parentauthour)[0] + 1)