How to Make a Reddit Bot: Complete Guide (2026)

Reddit bots can automate nearly everything — posting content on a schedule, replying to comments, flairing posts, and removing rule-breaking content before a moderator ever sees it.

This guide walks you through exactly how to build one, from zero to a fully working Reddit bot in Python using PRAW (the Python Reddit API Wrapper).

Whether you want a Reddit auto post bot, a comment bot, or a full moderation suite — this covers all of it.

What Is a Reddit Bot?

A Reddit bot is an automated script that interacts with Reddit via the official Reddit API. Bots can read posts and comments, submit content, send replies, upvote or downvote (within policy limits), and perform moderation actions.

There are three main types of Reddit bots:

  • Comment bots — scan new comments or posts and reply automatically based on triggers or keywords
  • Auto post bots — submit links, text posts, or crossposted content on a schedule
  • Moderation bots — remove posts, assign flair, ban users, or send modmail based on subreddit rules

Some of the most well-known Reddit bots are AutoModerator (Reddit's built-in mod bot), u/RemindMeBot (schedules reminders), and u/AutoWikiBot (auto-links Wikipedia articles).

A well-built bot adds genuine utility. A poorly built one gets banned fast.

Prerequisites: What You Need Before You Start

Before writing a single line of code, you need three things in place.

1. Python 3.8+

Download Python from python.org if you don't have it. Check your version with:

python --version

2. PRAW (Python Reddit API Wrapper)

PRAW is the standard library for interacting with Reddit's API in Python. Install it with pip:

pip install praw

The PRAW documentation is thorough and well-maintained — bookmark it.

3. Reddit API Credentials

You need a Reddit account and a registered application to get API credentials. Here's how:

  1. Log into Reddit and go to https://www.reddit.com/prefs/apps
  2. Click "create another app" at the bottom
  3. Choose "script" as the app type
  4. Fill in a name and redirect URI (use http://localhost:8080 for personal scripts)
  5. Note down your client_id (shown under the app name) and client_secret

Always read the Reddit API terms before building. Rate limits, data usage policies, and bot labeling requirements are all covered there.

How to Create a Reddit Bot: Step-by-Step

Here's a minimal working bot that authenticates and reads the top posts from a subreddit.

Step 1: Set up authentication

import praw

reddit = praw.Reddit(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
    username="YOUR_REDDIT_USERNAME",
    password="YOUR_REDDIT_PASSWORD",
    user_agent="my_reddit_bot/1.0 by u/YOUR_USERNAME"
)

print(reddit.user.me())

If your credentials are correct, this prints your bot's username.

Step 2: Read posts from a subreddit

subreddit = reddit.subreddit("learnpython")

for post in subreddit.hot(limit=10):
    print(post.title, post.score)

This fetches the top 10 hot posts and prints their titles and scores.

Step 3: Store credentials securely

Never hardcode credentials in your script. Use a praw.ini file or environment variables instead:

[DEFAULT]
client_id=YOUR_CLIENT_ID
client_secret=YOUR_CLIENT_SECRET
username=YOUR_REDDIT_USERNAME
password=YOUR_REDDIT_PASSWORD
user_agent=my_reddit_bot/1.0 by u/YOUR_USERNAME

Place praw.ini in your project root, then initialize PRAW with no arguments:

reddit = praw.Reddit()

PRAW automatically reads the config file. Much cleaner, and safer.

Reddit Auto Post Bot: Scheduling Content

An auto post bot submits posts to a subreddit on a schedule. This is useful for daily threads, announcements, or curated content feeds.

Submitting a text post:

subreddit = reddit.subreddit("test")

subreddit.submit(
    title="Daily Discussion Thread - March 7, 2026",
    selftext="What's everyone working on today? Share your projects below."
)

Submitting a link post:

subreddit.submit(
    title="Check out this resource",
    url="https://example.com/resource"
)

Adding a schedule with Python's schedule library:

pip install schedule
import schedule
import time
import praw

reddit = praw.Reddit()

def post_daily_thread():
    subreddit = reddit.subreddit("YOUR_SUBREDDIT")
    subreddit.submit(
        title="Daily Thread",
        selftext="Post your updates here."
    )
    print("Posted daily thread.")

schedule.every().day.at("09:00").do(post_daily_thread)

while True:
    schedule.run_pending()
    time.sleep(60)

This runs indefinitely, posting every day at 9:00 AM server time.

A few important rules for auto-posting bots:

  • Check subreddit rules before automating posts — many subs explicitly ban bots
  • PRAW enforces Reddit's rate limit of one request per second (10 per minute for OAuth apps)
  • Label your bot account clearly — Reddit's Content Policy requires transparency

For broader Reddit marketing automation strategies, see our Reddit marketing guide.

Reddit Comment Bot: Auto-Reply Patterns

A comment bot monitors new comments (or posts) and replies when a trigger condition is met.

Basic comment bot that replies to keyword mentions:

import praw

reddit = praw.Reddit()
subreddit = reddit.subreddit("learnpython")

TRIGGER = "!help"

for comment in subreddit.stream.comments(skip_existing=True):
    if TRIGGER in comment.body.lower():
        comment.reply(
            "Hi! Here are some resources to get you started: "
            "https://docs.python.org/3/"
        )
        print(f"Replied to comment by u/\{comment.author\}")

The stream.comments() method continuously polls for new comments — no manual refresh loop needed.

Avoiding infinite reply loops:

Always check that you're not replying to your own bot account:

if comment.author == reddit.user.me():
    continue

Tracking replied comments to prevent duplicates:

replied_to = set()

for comment in subreddit.stream.comments(skip_existing=True):
    if comment.id in replied_to:
        continue
    if TRIGGER in comment.body.lower():
        comment.reply("Your reply here.")
        replied_to.add(comment.id)

For persistence across restarts, store replied IDs in a SQLite database or a flat text file.

Rate limiting your replies:

Reddit will shadowban bots that post too fast. Add a sleep between replies:

import time

comment.reply("Your reply here.")
time.sleep(2)

Two seconds between replies is a safe baseline.

Reddit Moderation Bot

A moderation bot can automate the most repetitive parts of running a subreddit — flairing posts, removing spam, sending warnings, and more.

You need moderator permissions on the target subreddit for mod actions to work.

Auto-flair posts based on title keywords:

import praw

reddit = praw.Reddit()
subreddit = reddit.subreddit("YOUR_SUBREDDIT")

FLAIR_RULES = \{
    "question": "Question",
    "help": "Help Request",
    "tutorial": "Tutorial",
\}

for post in subreddit.stream.submissions(skip_existing=True):
    title_lower = post.title.lower()
    for keyword, flair_text in FLAIR_RULES.items():
        if keyword in title_lower:
            post.flair.select(flair_text)
            print(f"Flairing: \{post.title\}")
            break

Removing posts that contain banned phrases:

BANNED_PHRASES = ["buy followers", "free karma", "dm me for promo"]

for post in subreddit.stream.submissions(skip_existing=True):
    if any(phrase in post.title.lower() for phrase in BANNED_PHRASES):
        post.mod.remove()
        post.mod.send_removal_message(
            "Your post was removed for violating subreddit rules."
        )
        print(f"Removed post: \{post.title\}")

Sending automated modmail:

subreddit.modmail.create(
    subject="Bot Notification",
    body="Automated report: rule violation detected.",
    recipient="u/USERNAME"
)

For more advanced moderation workflows, read our Reddit moderator guide. And if you want to use Reddit's built-in AutoModerator instead of a custom bot, see our Reddit AutoMod guide.

Bot Rules and Reddit's Bot Policy

Reddit has clear rules about bots. Violating them will get your bot account banned — permanently.

Key rules to follow:

1. Label your account as a bot. Add "Bot" to your username (e.g., u/MyProjectBot) and set your account bio to state it's automated. Reddit expects this.

2. Respect subreddit rules. Many subreddits explicitly ban bots. Always check the sidebar and rules page before running a bot in any community. Some subreddits require bot approval from moderators.

3. Don't manipulate votes. Using bots to upvote or downvote content at scale violates Reddit's Voting and Engagement Policy. This is one of the fastest ways to get permanently banned.

4. Follow rate limits. PRAW handles rate limiting automatically, but if you're making raw API requests, stay within 60 requests per minute (authenticated). Exceeding this triggers 429 errors and potential account flags.

5. Don't spam. A comment bot that fires on every post in a high-volume subreddit will get reported and banned within hours. Use targeted triggers, not blanket responses.

6. Read the API terms. The Reddit API terms have been updated since 2023. Commercial uses require higher-tier API access. Know what applies to your use case.

For more context on working within Reddit's API ecosystem, see our Reddit API guide.

Common Reddit Bot Examples

Here are real use cases where Reddit bots add genuine value:

u/RemindMeBot — Users comment "RemindMe! 3 days" and the bot sends a reminder via DM. Simple, high-utility, universally loved.

Subreddit daily thread bots — Large subreddits like r/learnprogramming use bots to post daily/weekly threads automatically, keeping the community organized without moderator effort.

Karma farming bots — These are what you DON'T want to build. They repost top content, spam generic replies, and get accounts banned quickly. They also damage communities.

Flair enforcement bots — Post flair isn't always filled in by users. A mod bot that auto-flairs posts based on title patterns dramatically reduces moderator workload.

Crossposting bots — Bots that monitor one subreddit and crosspost relevant content to another. Common in niche communities that aggregate from multiple sources.

Spam detection bots — Scan post history and comment patterns to flag suspicious new accounts before a human moderator reviews them.

Alert bots — DM subreddit moderators when specific keywords appear in posts or comments. Useful for community management at scale.

Frequently Asked Questions

Is it legal to build a Reddit bot?

Yes, building a Reddit bot is legal as long as it complies with Reddit's API terms of service and Content Policy. Bots that manipulate votes, scrape data commercially without authorization, or violate subreddit rules can result in account bans or legal action in extreme cases.

Do Reddit bots need to be labeled?

Yes. Reddit's bot policy requires that automated accounts be clearly labeled. Add "Bot" to your username, note it in your account bio, and if your bot interacts with users, include a statement in its replies explaining what it is.

How do I avoid getting my Reddit bot banned?

Follow rate limits, label your account, respect subreddit rules, never manipulate votes, and don't spam. Bots that provide genuine utility and operate transparently rarely get banned. Bots that behave like spam accounts get flagged within hours.

Can a Reddit bot upvote posts?

Technically yes, PRAW has vote methods — but using bots to manipulate votes at scale violates Reddit's policy and can result in permanent bans for both the bot and the controlling account. Don't do it.

What is PRAW and why use it?

PRAW (Python Reddit API Wrapper) is the official Python library for Reddit's API. It handles authentication, rate limiting, and provides clean Python interfaces for all Reddit API endpoints. It's the standard choice for Reddit bot development in Python.

How much does it cost to use the Reddit API?

The Reddit API is free for personal and low-volume use (under 100 requests per minute). High-volume or commercial use requires a paid Data API access tier. Check the Reddit API terms for current pricing and tiers — these have changed since 2023.