Skip to content

archy-bold/not-enough-musk-spambot

 
 

Repository files navigation

Reddit Comment Bot

This Reddit Comment Bot is a python-based auto-responder.

  • Pick a subreddit to scan
  • Designate a specific comment to search for
  • Set your bot's reply

Install

# Install dependencies
pip install -r requirements.txt
# Setup the sqlite db
python setup.py

Requirements

Setup

Reddit App:
  1. Navigate to the Apps page
  2. Click create an app
  3. name: Set a name for your app
  4. type: Script
  5. description: Optional
  6. about url: Optional
  7. redirect uri: http://localhost:8080
  8. Note the outputted client id and secret
.env:
cp .env.example .env
  1. BOT_NAME: your Reddit username
  2. PASSWORD: your Reddit password
  3. CLIENT_ID: the outputted client id
  4. CLIENT_SECRET: the outputted secret
reddit_bot.py:

Set the subreddit to search (default = "r/test"):

r.subreddit('test')

Comment search criteria (default = "sample user comment"):

if "sample user comment"

Bot's comment reply (default = "Hey, I like your comment!"):

comment.reply("Hey, I like your comment!")

Usage

Navigate into the bot directory. Run your bot:

$ python reddit_bot.py

Docker

It's possible to containerise the script.

To build it:

docker build -t reddit_bot -f .docker/reddit_bot/Dockerfile .

Then run with:

docker run -e SUBREDDIT=test -e SLEEP=0 -e SUBMISSION_PROBABILITY=0.25 -e COMMENT_PROBABILITY=0.1 -e REPLY_AGE=4 -e ENV=test -e MODE=once -e BOT_NAME=xxx -e PASSWORD=xxx -e CLIENT_ID=xxx -e CLIENT_SECRET=xxx reddit_bot

Phrase Sources

For a rundown of the phrases and their sources, see phrases.md. Yes, Elon Musk has said everything this dumb bot repeats.

Credits

About

Bot to post replies in r/EnoughMuskSpam

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.3%
  • Dockerfile 0.7%