This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usernotes Notifier Bot v 2.0 by u/BuckRowdy | |
from datetime import datetime | |
import praw | |
import time | |
import pmtw | |
import re | |
import json | |
reddit = praw.Reddit( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run_bot(): | |
try: | |
print('Working...') | |
unread_conversations = reddit.subreddit(sub_name).modmail.conversations(state="highlighted") | |
for conversation in unread_conversations: | |
if (len(conversation.authors) > 1 and len(conversation.messages) > 1 and "find_last" in conversation.messages[-1].body_markdown): | |
print(f'Match Found: {conversation.id}') | |
username = conversation.user | |
target_sub = conversation.owner | |
api = PushshiftAPI() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# modeled off of user_history_bot | |
import praw | |
import traceback | |
import time | |
import sys | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""This example demonstrates the flow for retrieving a refresh token. | |
In order for this example to work your application's redirect URI must be set to | |
http://localhost:8080. | |
This tool can be used to conveniently create refresh tokens for later use with your web | |
application OAuth2 credentials. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Automod comment killer bot for r/sourdough | |
# Import modules needed for the bot to run. | |
import praw | |
import sys | |
import time | |
# Define subreddit and bot's comment reply | |
sub_name = 'sourdough' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import praw | |
import time | |
from datetime import datetime as datetime | |
def login(): | |
reddit = praw.Reddit( | |
user_agent = "USER_AGENT", | |
client_id = 'CLIENT_ID', | |
client_secret = 'CIENT_SECRET', | |
refresh_token = 'TOKEN' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import sys | |
import praw | |
import time | |
from datetime import datetime as dt, timedelta as td, date | |
# This is a file in the same folder (called config.py) | |
import config |