diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-08 20:35:12 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2019-01-08 20:35:12 +0000 |
commit | 5a8e9a81889b2c1520d68fbd1fd5e787a273113b (patch) | |
tree | 9af88b813a7b5bb42725c7d51cf47405a2cdba76 /SmallYTChannelBotSubmissions.py | |
parent | 332ae56f3a241a89dddc920523c156d909aa1d36 (diff) | |
parent | 7937aadec4389bfe96d3d80cfad50312efa2e5d9 (diff) | |
download | SmallYTChannelBot-5a8e9a81889b2c1520d68fbd1fd5e787a273113b.tar.gz SmallYTChannelBot-5a8e9a81889b2c1520d68fbd1fd5e787a273113b.zip |
updated database
Diffstat (limited to 'SmallYTChannelBotSubmissions.py')
-rw-r--r-- | SmallYTChannelBotSubmissions.py | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/SmallYTChannelBotSubmissions.py b/SmallYTChannelBotSubmissions.py index 1024429..ca447b7 100644 --- a/SmallYTChannelBotSubmissions.py +++ b/SmallYTChannelBotSubmissions.py @@ -7,6 +7,7 @@ from database import Database import matplotlib import ytapi import datetime +import ytapi import login import time import praw @@ -15,8 +16,8 @@ import os reddit = login.REDDIT -subreddit = reddit.subreddit("SmallYTChannel") -#subreddit = reddit.subreddit("jwnskanzkwktest") +#subreddit = reddit.subreddit("SmallYTChannel") +subreddit = reddit.subreddit("jwnskanzkwktest") db = Database() @@ -241,12 +242,12 @@ def main(): else: if score < 3: 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 + 3λ 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() else: text = """Thank you for submitting to /r/SmallYTChannel. You have spent 3λ to submit here, making your current balance %iλ. /u/%s, please comment `!givelambda` to the most helpful advice you are given. You - will be rewarded 1λ if you do so. For more information, read the [FAQ](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (score - 3, str(submission.author)) + will be rewarded 1λ if you do so. For more information, read the [FAQ.](https://www.reddit.com/user/SmallYTChannelBot/comments/a4u7qj/smallytchannelbot_faq/)""" % (score - 3, str(submission.author)) db.change_lambda(str(submission.author), -3) try: @@ -257,7 +258,7 @@ def main(): text += """ \n\n\n##Video data: -Field|Data +**Field**|**Data** :-|:- Title|%s Thumbnail|[Link](%s) @@ -269,7 +270,7 @@ Description|%s ##Channel Data: -Field|Data +**Field**|**Data** :-|:- Name|%s Thumbnail|[Link](%s) @@ -309,9 +310,9 @@ Views|%s continue if __name__ == "__main__": - #file = open("pid.txt", "w") - #file.write(str(os.getpid())) - #file.close() + file = open("pid.txt", "w") + file.write(str(os.getpid())) + file.close() print("\n####################\n[%s] RESTARTED\n####################\n" % get_time()) main() |