Giter VIP home page Giter VIP logo

reddit-placebot's Introduction

Reddit Place Bot

This is a bot I made for the Reddit /r/place event of 2017 April Fools Day.

I made this bot to protect our national flag on /r/argentina

This is how it looks now, but it might change when you read it, visit the placebot-argentina-target repo to see how it actually is right now

Installation

You need to have NodeJS installed

git clone https://github.com/zequez/reddit-place-bot
cd reddit-place-bot
npm install

Configuration

Change users.example.json to users.json and add your username and password of your account and all your throwaways.

Target Drawing

If you run it as it is, is going to connect to the placebot-argentina-target repository and try to draw the official_target.bmp. If you don't want to do that you can open config.js and set autoupdateRemoteTarget: false. This will make it use target.bmp instead.

Every time it's time to place a pixel the bot will download the board (and latest remote target) and find the first pixel that doesn't match the target, and fill it with the correct color.

About Colors

Since I honestly couldn't figure out how to make transparent BMP files I just set it so that the color #ff00ff is considered transparent. Anything transparent will be ignored.

You have to use the exact same colors as the board or the app is gonna throw an error, it's not smart enough to guess the colors based on similarity.

Usage

  npm run start

It'll keep keep drawing forever and if it can't draw anymore it's gonna wait until something breaks and fix it.

Testing

LOL

You can npm run watch, but that's about it.

Similar Projects

Thanks to trosh/rplace to figure out how to actually read the bitmap from the server. I just ported that to Node.

License

MIT

reddit-placebot's People

Contributors

zequez avatar

Watchers

James Cloos avatar  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.