/NannyBot-post-reply

Uses NannyBot to follow your posts and replies with your customized message.

Primary LanguageJavaScriptMIT LicenseMIT

Project logo

NannyBot

License


📝 Table of Contents

About

This bot uses the NannyBot functionality, which follows you around everywhere you go and replies to all your posts with a message that you set.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

This project is built with Node.JS. Download the latest version here. Now download the code from this repo and use npm i to install the dependencies required to develop and run your bot.

Setting Up Your Script App

You'll have to create a new account for your bot before you move any further.
Once the account is created, log in, go to reddit.com/prefs/apps to fill out the form to create a new script app.

Environment Variables


Now that you've set up your bot account and created a script app, it's time to download the source code and paste in your environment variables.
Also have open reddit.com/prefs/apps as you'll need to copy & paste the items you'll find there.


USER_AGENT is just a name that the server will identify your bot by. It can be whatever you want.
CLIENT_ID and CLIENT_SECRET are fround in prefs/apps.
REDDIT_USER is your bots username.
REDDIT_PASS is its password.
DEBUG_NETWORK may be set to false unless any problems arise.
STARTUP_LIMIT will cause the bot to check this many items on the first sweep. Setting this value higher will ensure that when stopping and restarting the bot, no requests are forgotten. This value may be set up to 100
USER_SUBMISSION_LIMIT Will limit the amount of posts the bot will find on its next sweeps after the first.
INTERVAL The time (in minutes) for which the bot should sleep between doing its job again.
NANNY_USER The username of the redditor the bot will follow. MESSAGE The message the bot will reply with when it sees a new post you have made.

USER_AGENT="YOUR BOT'S NAME"
CLIENT_ID="FROM PREFS/APPS"
CLIENT_SECRET="FROM PREFS/APPS"
REDDIT_USER="YOUR BOT'S USERNAME"
REDDIT_PASS="YOUR BOT'S PASSWORD"
DEBUG_NETWORK="false"
STARTUP_LIMIT='5'
INTERVAL='1'
NANNY_USER="bwz3r"
USER_SUBMISSION_LIMIT='5'
MESSAGE="Check out this [link](https://www.freelancer.com/u/BestBotDev)!!"

Once these fields are completely filled out, remove EXAMPLE from the end of the filename.

pw.envEXAMPLE = pw.env


Usage

First install the dependencies by double-clicking install.bat or running this command: npm i

Now you may run the bot by double-clicking run.bat or running this command: node src/bot.js