Coder Social home page Coder Social logo

copypastabot's Introduction

CopyPastaBot

This discord bot allows to browse reddit, post reddit posts and play a text-to-speach stream from a reddit post.

Requirements

Installation

  1. Once all the requirements are met run docker create -v /var/lib/mysql --name copypasta mysql.
  2. Navigate to where you want to keep this repo and clone it.
  3. Run ./startCopy.sh.
    • The first time running will create an error since the bot isn't configured yet.
  4. Future running can be done with docker container start copypastabot or ./startCopy.sh. Starting it the latter way will try and use the latest version

Configuration

At this moment this is a very tedious process and will be improved. There are two ways to do it, trough attaching to the docker container or running commands inside it. Both ways need the container to be running.

Attaching to the container

  1. In the terminal run docker attach copypastabot.
  2. The config can be edited/viewed by typing config set/view <field> <value> where the value field is only needed when you are setting the value of a field.
  3. Exit the container by using cmd+P + cmd+Q or Ctrl+P + Ctrl+Q.

Running commands inside the container

  1. In the terminal run docker exec -it copypastabot sh
  2. Type mysql
  3. Type connect COPY_DB
  4. To edit the config values you now have to use SQL update statements like UPDATE config SET <field>=<value>, <field2>=<value2>, .... ;
  5. Exit the container by using cmd+P + Q or Ctr+P + Q.

Fields

  • AuthThkn Auth token for the discord bot. (String)
  • Debug Boolean value if you need to test something in a private server. (Boolean)
  • DebugServer private server ID for testing. (Integer)
  • IntervalTimeInSeconds amount of time for when the bot checks the top posts of /r/copypasta. (Integer)
  • User_agent name of the bot in the reddit api. (String)
  • Client_Id ID of the bot in the reddit api. (String)
  • Client_Secret secret of the bot in the reddit api. (String)
  • Username username of a reddit account. (String)
  • Password password of a reddit account. (String)
  • MinUpvotes minimum upvotes a post needs to be seen in the interval time. (Integer)
  • PostLimit amount of posts it posts every interval. (Integer)
  • MessageLimit character limit for discord. (Integer)
  • PageSize page size for the list command. (Integer)
  • LogOffMessages logg off messages for when the bot stops working (not working at the moment) (Array of strings)

copypastabot's People

Contributors

stollenaar avatar jackharrhy avatar dependabot[bot] avatar

Watchers

 avatar

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.