Vooby STEEM Bot v0.0.2 - Open Source NodeJS New Post in Tag Vote Script (Revised)

in #steemdev7 years ago (edited)

Ever wanted to upvote every new post in a certain tag?

Vooby

Vooby stands for "Voting Noobies" and is a stand alone NodeJS script which allows anyone to automate upvoting all post in the "#introduceyourself" (or any other) tag. I created it over the past few hours after deciding it would be neat to experiment with upvoting new users to see if it increases user retention.. and also to reward new comers to our network with their first little bit of post payout!

Installation & Bot Usage

First off this is a NodeJS script so you'll have to head on over to their website at NodeJS.org and install whatever offering they have for your operating system

Once you've got nodeJS installed the next step is to copy the script below into a new file on your computer.. Preferably named "voobyv002.js" or something similar!

//--------------------------------------------------------------------------
//----- Vooby STEEM Bot  v0.0.2
//----- Developed by @KLYE || Free to Use for All! || Free to Modify -------
//----- Rekuirements to run: Node.js + steem.js
//----- npm install steem --save
//--------------------------------------------------------------------------
//----- PLEASE DO NOT USE THIS CODE BELOW MALICIOUSLY / FOR EVIL DEEDS -----
//--------------------------------------------------------------------------
//----- CONFIG + Get Rekuirements
// ***IMPORTANT*** Your Posting Private Key Below
var wifkey = ' ';

// ***IMPORTANT*** Enter Voting account below (no @)
var votey = "klye";

// ***IMPORTANT*** Enter the Tag you want to upvote new posts in
var targettag = "art";

// ***IMPORTANT*** May want to modify this (10000 = 100% vote)
var weight = 2;

// No need to modify these variables
var steem = require('steem');
var totalvote = 0;
var metadatascan;
var json_metadata;
var op;

//----- Script Started + Show Time
console.log("===================================================================");
console.log("-------------------------------------------------------------------");
console.log("- Vooby Bot v0.0.2 ONLINE - By @KLYE - Listening to STEEM Network -");
console.log("-------------------------------------------------------------------");
console.log("===================================================================");

//----- Grab Current STEEM Block
steem.api.streamBlockNumber(function (err1, newestblock) {
    console.log("Scanning Block #" + newestblock + " For New #" + targettag + " Posts - Posts Voted: " + totalvote);
});

//NOTE: Sometimes the Script Fails to Hook Into STEEM. Try Running Script Again if it Fails!

//----- See if Post is our Target Asshat ----
var process_post = function (op) {
    if (op["author"] != "") {
        console.log(targettag + " Post Has Been Detected! Upvoting!");
        steem.broadcast.vote(
            wifkey,
            votey,
            op["author"],
            op["permlink"],
            weight,
            function (downerr, result) {
                if (downerr) {
                    var error = JSON.stringify(downerr);
                    if (error.toLowerCase().indexOf("You have already voted in a similar way.\n") >= 0) {
                        console.log("Oops! Vooby tried to vote for a post it already voted on!");
                    }
                }
                if (result) {
                    totalvote++;
                    console.log("Successfully voted #" + targettag + " post!");
                }
            }
        );
    }
};
//----- Streeming Latest Block Operations
steem.api.streamOperations(function (err2, blockops) {
    // get 1st item in blockops an apply to operationType variable to check type later
    var opType = blockops[0];
    // get 2nd item in blockops and store it later to be parsed if it's our specified type of operation
    var op = blockops[1];
    if (op["json_metadata"] != undefined) {

        metadatascan = op["json_metadata"];
        if (metadatascan != '') {
            var tags = JSON.parse(metadatascan);
            var actualtags = tags["tags"];
            if (actualtags != undefined) {
                var tagtag = String(actualtags);

                if (op["parent_author"] === '') {
                    if (tagtag.toLowerCase().indexOf(targettag) >= 0) {
                        process_post(op);
                    }
                }
            }

        }
    }
});

When you have the file saved to your computer open up command prompt (or equivalent) and navigate to the file. While you are doing this make sure to fill in the account you want to vote from and fill in your private posting key in whatever text editor of your choice.

Make sure to install Steem.js using npm install steem --save - After that run it with the command node voobyv001.js and if it's been configured correctly it should run as pictured above. Super easy to run. Shouldn't be too much of a hassle. Enjoy voting the noobs!


VOTE @KLYE FOR WITNESS

steemit.com/~witnesses
Sort:  

Please don't make this a thing.

There is a bunch of accounts posting nothing but #introduceyourselve with stolen pictures from Korean ladies. And these accounts make a good income.

I invite you to follow @goodbot's quest or simply update your script to not vote for intros, which @goodbot has commented on.

Hmmm. Perhaps I'll stop mine I guess.. Didn't realize we were having a scammer issue..

After a few introductyourself posts you get flagged by the network and the bots, i clicked on a "new" post the other day , and someone had used it 150 times and bots were telling them they couldnt do this

Yeah that's my bot, but it isn't flagging and it wouldn't have enough sp.

I could delegate it some if you wanted.. how many SP you need?

That's a nice offer, but I don't want to autoflag anybody here ...

For now, I'm happy to comment.

i love your voby bot, please allow me to use it,
we have to build a steemit community named NSC aka Nanggroe Steemit Community and use nsc tag, I will use that bot to auto-vote #nsc tag,.. thx for awesome work.

you are a genius ,thank you

No problem

Nex voting

Can we download it in iOS ! iPhone @klye

Hello Vooby , this is very cool and promising. I am into it. See you Soon. Good Luck . :)

Love post,,, nex

Nice one again from you @klye. Turning geek!

a real helpful Bot.. thanks for your efforts.

VOOBY!!!!!!!!!!!!

Lol, nifty idea

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.033
BTC 97012.14
ETH 3139.09
USDT 1.00
SBD 2.98