From d5ac81c46ca03caf1f529256e637bad6928f5327 Mon Sep 17 00:00:00 2001 From: HallowedDust5 Date: Wed, 15 Jun 2022 15:03:16 -0400 Subject: [PATCH] Fixed submission not assigned bug --- reddit/subreddit.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/reddit/subreddit.py b/reddit/subreddit.py index 68ff8e7..6a3275d 100644 --- a/reddit/subreddit.py +++ b/reddit/subreddit.py @@ -39,8 +39,8 @@ def get_subreddit_threads(): username=os.getenv("REDDIT_USERNAME"), password=passkey, ) - - pickThread(reddit) + + submission = pickThread(reddit) print_substep(f"Video will be: {submission.title} :thumbsup:") console.log("Getting video comments...") @@ -91,6 +91,8 @@ def pickThread(reddit): threads = subreddit.hot(limit=25) submission = list(threads)[random.randrange(0, 25)] + return submission + def configurePasskey(): if os.getenv("REDDIT_2FA", default="no").casefold() == "yes": print(