Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

Simple Reddit Bot Library

Project description

Bottr makes writing bots for reddit easy. It currently provides two predefined bots:

CommentBot:Listens to new comments in a list of subreddits
SubmissionBot:Listens to new submission in a list of subreddits

Bottr makes use of the Python Reddit API Wrapper PRAW.


Check out [bottr-template]( for a convenient code template to start with.


Bottr is available on PyPi and can be installed via

$ pip install bottr

Quick Start

The following is a quick example on how to monitor r/AskReddit for new comments. If a comment contains the string 'banana', the bot replies 'This comment is bananas.'

import praw
import time

from import CommentBot

def parse_comment(comment):
    """Define what to do with a comment"""
    if 'banana' in comment.body:
        comment.reply('This comment is bananas.')

if __name__ == '__main__':

    # Get reddit instance with login details
    reddit = praw.Reddit(client_id='id',
                         user_agent='Script by /u/...',

    # Create Bot with methods to parse comments
    bot = CommentBot(reddit=reddit,

    # Start Bot

    # Run bot for 10 minutes

    # Stop Bot

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for bottr, version 0.1.4
Filename, size File type Python version Upload date Hashes
Filename, size bottr-0.1.4-py3-none-any.whl (8.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size bottr-0.1.4.tar.gz (6.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page