Sweet little script, good job! Made a concise edit that uses Thread from threading (rather than Process from multiprocessing) and edits comments and text submissions (i.e. self posts) to "." before deleting them, for extra security (as deleting comments without editing them doesn't technically delete them, just makes them not show).
``` import praw from threading import Thread
user_agent = 'bot_name' client_id = '14_char_key' client_secret = '27_char_key'
username = 'your_username' password = 'your_password'
delete_comments = True delete_posts = True
comment_limit = None post_limit = None
reddit = praw.Reddit( user_agent=user_agent, client_id=client_id, client_secret=client_secret, username=username, password=password)
redditor = reddit.redditor(username)
def del_comments(): for comment in redditor.comments.new(limit=comment_limit): comment.edit(".") comment.delete()
def del_posts(): for submission in redditor.submissions.new(limit=post_limit): if(submission.is_self): submission.edit(".") submission.delete()
if(delete_comments): Thread(target=del_comments).start() if(delete_posts): Thread(target=del_posts).start() ```