From f60dfbd9a0523e9aba07b7935c26672b1578bcd7 Mon Sep 17 00:00:00 2001 From: jwansek Date: Sat, 2 Feb 2019 11:54:35 +0000 Subject: database backup --- SmallYTChannelBotSubmissions.py | 38 +++++++++++++++++++------------------- SmallYTChannelDatabase.db | Bin 621568 -> 1472512 bytes 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/SmallYTChannelBotSubmissions.py b/SmallYTChannelBotSubmissions.py index 0fa9967..1c204dd 100644 --- a/SmallYTChannelBotSubmissions.py +++ b/SmallYTChannelBotSubmissions.py @@ -203,25 +203,25 @@ def main(): reply = comment.reply(text + tail) reply.mod.distinguish() - if comment.body[:11] == "!takelambda" and str(comment.author) in get_mods(): - try: - splitted = comment.body.split() - user = splitted[1].replace("/u/", "") - toremove = int(splitted[2]) - reason = " ".join(splitted[3:]) - - text = "/u/%s has had %iλ taken away from them for the reason '%s'. /u/%s now has %iλ" % (user, toremove, reason, user, db.get_lambda(user)[0] - toremove) - db.change_lambda(user, -toremove) - except Exception as e: - print("[ERROR while removing λ] %s" % e) - text = r"An error was encountered. Please use the syntax `!takelambda [user] [how much to remove {integer}] [reason]`" - reply = comment.reply(text + tail) - reply.mod.distinguish() - continue - - update_users_flair(comment.parent()) - reply = comment.reply(text + tail) - reply.mod.distinguish() + #if comment.body[:11] == "!takelambda" and str(comment.author) in get_mods(): + # try: + # splitted = comment.body.split() + # user = splitted[1].replace("/u/", "") + # toremove = int(splitted[2]) + # reason = " ".join(splitted[3:]) + # + # text = "/u/%s has had %iλ taken away from them for the reason '%s'. /u/%s now has %iλ" % (user, toremove, reason, user, db.get_lambda(user)[0] - toremove) + # db.change_lambda(user, -toremove) + # except Exception as e: + # print("[ERROR while removing λ] %s" % e) + # text = r"An error was encountered. Please use the syntax `!takelambda [user] [how much to remove {integer}] [reason]`" + # reply = comment.reply(text + tail) + # reply.mod.distinguish() + # continue + + # update_users_flair(comment.parent()) + # reply = comment.reply(text + tail) + # reply.mod.distinguish() for submission in submission_stream: diff --git a/SmallYTChannelDatabase.db b/SmallYTChannelDatabase.db index cd5d260..c9258d5 100644 Binary files a/SmallYTChannelDatabase.db and b/SmallYTChannelDatabase.db differ -- cgit v1.2.3