Coder Social home page Coder Social logo

specsbot's Introduction

SpecsBot

This project is the source code for /u/SpecsBot that currently runs in /r/bapcsalescanada. It was inspired by a similar project but plans to add more features.


Running the bot

You must have go version 1.19 or greater installed to build and run. You can find the latest installer for your system here.

To build the application, run the following command to create a binary for your system.

go build ./...

Alternatively you can use the Dockerfile to build this on any system.

docker build .

To run the application you need to set the following environment variables

  • BOT_AGENT - A user agent for your bot as defined here
  • BOT_ID - The Reddit OAuth2 client_id
  • BOT_SECRET - The Reddit OAuth2 secret
  • BOT_USERNAME - The username of your bot
  • BOT_PASSWORD - The password of the bot account
  • SUBREDDIT - The subreddit you want to scan (eg bapcsalescanada)

Project Structure

This project is separated into packages. The main package simply fetches and calls the various post handlers from each child module. Whenever a post from the followed subreddit is detected, each module's post handler will be called. It is up to each post handler to only respond to their type of post.


License

This project's code is licensed under the MIT license. However, some of the resources used by this bot such as spreadsheets are not. Therefore, while the source code of this project is licensed under MIT, the comments created by this bot and the resources it dynamically fetches at run time may not be MIT licensed.

specsbot's People

Contributors

rrsharpe avatar

Watchers

 avatar

specsbot's Issues

Add a comment reply handler for deletion

We should have a way for people to delete posts. Since the bot pulls previous posts, we can't delete or else the post may come back. Instead, edit the post replacing it with who removed it.

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.