GithubHelp home page GithubHelp logo

reddit's Introduction

Bobby B Bot - Reddit version

Build Status GitHub release GitHub All Releases GitHub issues GitHub Subreddit subscribers ko-fi

In this repository you can find the Reddit (and original) version of the Bobby B Bot.

How to use it

Simply write one of the keywords (usually variations of the bot's name) in a comment in the subreddits the bot is listening on, and the bot will reply with a random quote.

  • Only listens on mentioned subreddits to avoid spamming other subs.
  • Always follow and comply with Reddit bot rules and best practices: bottiquette

How to install

  1. Create a virtual environment and activate it (this is optional but when working with Python, I cannot recommend it enough) or create a root folder that will hold all the code;
  2. Clone reddit repository inside this virtual enviroment folder (let's call it 'root') and then clone utils repository. The final structure should be somewhat similar to this:
+ root
└───+ reddit
│     |-- praw.ini 
│     |-- blocked_users.json
│     |-- subs.json
│     |-- reddit_bot.py
└───+ utils
      |-- __init__.py
      |-- core.py
      |-- logging_config.ini
      |-- quotes.json
      |-- triggers.json
  1. Run command pip install -r requirements.txt in reddit directory (this should install the requirements for utils as well, otherwise, you can also run the command in utils folder);
  2. Done, you are ready to configure it.

TL;DR Installation:

$ python -m venv <venv_name>
$ cd venv_name
$ source bin/activate
(venv_name) $ git clone https://github.com/bobby-b-bot/reddit.git
(venv_name) $ git clone https://github.com/bobby-b-bot/utils.git
(venv_name) $ cd reddit
(venv_name) $ pip install -r requirements.txt

How to configure and run

  1. Create and maintain the .env file for environment variables in reddit folder (ENV = 'TEST' or 'PROD' and TST_SUBS);
  2. Create and maintain the praw.ini file for PRAW (Python Reddit API) in root reddit folder (see PRAW documentation);
  3. Create and mantain a logging_config.ini file in utils folder for logging configuration (see documentation);
  4. Run the bot (python reddit_bot.py).
  5. Have fun!

How to contribute

Feature requests such as new quotes or more subreddits to run the bot on are welcome via issues on GitHub! Feel free to contribute. You can also contribute by donating via Ko-fi or PayPal to keep the servers running.

reddit's People

Contributors

fzanettini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

reddit's Issues

How about Bobby B comes onto GitHub?

Just had this awesome idea.

Let's keep this simple as well. We have Bobby B. He monitors some repositories and comments on issues/PRs whenever he is summoned.

I would like to work on it. You up?

Nothing shows up in command prompt after I run reddit_bot.py

As mentioned in my previous issue, after using the fix suggested, the errors no longer show up (which is good!"), however, nothing else shows up either after running reddit_boy.py. Is it meant to? Furthermore, none of my trigger words seem to interest my bot, who would rather remain silent than do as I command.

Could not get environment variable

I'm fairly new to python, so I'm not educated with all the jargon, but I think I've almost managed to get my Reddit bot working, however, there is this one issue that I cannot for the life of me understand how to fix. The error is as follows:

ERROR - Could not get environment variables: {} Traceback (most recent call last): File "...\reddit\reddit_bot.py", line 54, in <module> raise Exception # invalid environment variable

Release of actual production version which is far more sentient than random.choice?

It's incredibly clear that Bobby B is too sentient, too spot-on to the content matter, in its comments on Reddit to be using an unparameterized get_random_quote() from https://github.com/bobby-b-bot/utils/blob/master/core.py#L27 . The prevalence of the comment SENTIENT in response to this bot's posts is far greater than would be likely by random chance.

So is there a release timeline for the true version, which has to be some kind of GAN or other neural network trained to optimize quote choice for upvotes given the content of the prior message?

If this is proprietary to Bobby B Corp, that's fine (I, for one, welcome our Bobby B overlords), but we should likely add a clarification in the README that discloses that this is not the true code, and perhaps information about how to license the true Bobby B bot for enterprise deployments?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.