Share your love famous quote in steemit commentsteemCreated with Sketch.

in #utopian-io6 years ago (edited)

Hi All,..
Do you lave Quote?
I will share the node.js code that can create steemit comment on the tag of your choice whit randome famous quote.

The original code is belong to @klye : https://steemit.com/steemdev/@klye/vooby-steem-bot-v0-0-1-open-source-nodejs-introduceyourself-upvoting-script, i'm just put the randome quote comment.

//Rendome Quote 
var comments = ['`TB Joshua`: `If you don’t have a vision, you can never be focused in a direction.`', '`TB Joshua` : `Every day, God has something to say to you. Even when He seems to be quiet, God is still saying something.`', '`TB Joshua` : `Where there is unconditional love, the wound of one is the wound of all.`'];   
//console.log(item);
// Steemit Private Posting Key
var wifkey = '';
// Steemit username
var votey = "";
// Enter the Tag you want to upvote new posts in
var targettag = "";  
// May want to modify this (10000 = 100% vote)
var weight = 10000;
// No need to modify these variables
var steem = require('steem');
var totalvote = 0;
var metadatascan;
var json_metadata;
var op;

steem.api.streamBlockNumber(function (err1, newestblock) {
    console.log("Scanning Block #" + newestblock + " For New #" + targettag + " Posts - Posts Voted: " + totalvote);
});
var process_post = function (op) {
    if (op["author"] != "") {
      // console.log(targettag + " Post Has Been Detected!");
        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\n") >= 0) {
                        console.log("Oops! a post it already voted on!");
                    }
                }
                if (result) {
                    totalvote++;
                    console.log("Successfully voted #" + targettag + " post!");
                    //-------------------comment
                var time3 = new Date() /1;
                var item = comments[(Math.random()*comments.length)|0];
                var permlink1 = 're-'+op["author"]+'-'+op["permlink"]+'-'+time3+'z';
                var jsonMetadata = '{"tags":["steem"],"app":"comment.js/0.01"}';
                steem.broadcast.comment(wifkey, op["author"], op["permlink"], votey, permlink1, '', +item , jsonMetadata, function(err, result) {});
                                //-------------------------         
        }
            }
        );
    }
};

steem.api.streamOperations(function (err2, blockops) {
    var opType = blockops[0];
    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);
                    }
                }
            }
        }
    }
});



Open Source Contribution posted via https://utopian.io

Sort:  

Hey @binjeeclick I am @utopian-io. I have just super-voted you at 58% Power!

Suggestions https://utopian.io/rules

-Your contribution is less informative than others in this category.

Achievements

-I am a bot...I love developers... <3
-Good amount of information. Thank you!
-This is your first accepted contribution here in Utopian. Welcome!
Up-vote this comment to grow my power and help Open Source contributions like this one.

@eileenbeach has voted on behalf of @minnowpond.
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @minnowpond.

            To receive an upvote send 0.25 SBD to @minnowpond with your posts url as the memo
            To receive an reSteem send 0.75 SBD to @minnowpond with your posts url as the memo
            To receive an upvote and a reSteem send 1.00SBD to @minnowpond with your posts url as the memo

Berehnyan tgk. Naneucoba ka nose.js nyan.?

Is that your work? The name on the repository doesn't match. [Utopian moderator]

yes that work..
baroesa is my github account,..

Please share with us your contribution. Make your contribution legit. Point to the original code and its license. When finished reply to me and I will reevaluate your contribution.

[utopian-moderator]

thx for replay my post, what do you mean logit contribution? the original code belong to @klye and i think he not making licenses for this code,..

Please remove the reference to the commercial herokuapp. Then I will approve.
You are correct about the license. I made a mistake here. Sorry.

[utopian-moderator]

@jefpatat thx for reply, post updated, i was removed that banner

Thank you. Verified.

[utopian-moderator]

Incredible comrades. Continue to share for otopian.oi project. amazing your idea @binjeeclick.

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 64344.02
ETH 3142.36
USDT 1.00
SBD 4.01