Skip to content

Instantly share code, notes, and snippets.

View notesbot's full-sized avatar

Bucky notesbot

View GitHub Profile
# 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(
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()
# modeled off of user_history_bot
import praw
import traceback
import time
import sys
#!/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.
# 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'
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'
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