Skip to content

Commit

Permalink
add: reddit comment tracking
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Jul 14, 2024
1 parent f2906db commit 294cf72
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
20 changes: 11 additions & 9 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions bot/reddit/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,19 @@ async def comment_stream(reddit: asyncpraw.Reddit):
logger.error(str(e))
continue


async def main():
async def create_reddit():
secret = getenv("REDDIT_SECRET")
RPW = getenv("REDDIT_PW")

reddit = asyncpraw.Reddit(
return asyncpraw.Reddit(
client_id="-dOCgLIHqUJK7g",
client_secret=secret,
username="Powerful-Flight2605",
password=RPW,
user_agent="Reply Recruit"
)

async def main():
reddit = await create_reddit()
loop = asyncio.get_event_loop()
loop.create_task(comment_stream(reddit))
loop.create_task(post_stream(reddit))
Expand Down

0 comments on commit 294cf72

Please sign in to comment.