Distribubot, a bot which helps to distribute your Steem-Engine token

in steem-engine •  3 months ago  (edited)

You can find the source code on github. I pushed the first version also to pypi. Here you can also find the post about distribubot from @aggroed who supported my development.

Introduction

Distribubot can be used to allow token holder to distribute more token to other steem user by writing a comment with a specific command.

The BEER token already uses distribubot with the !BEER command:

How does it work

Distribubot transfers the token, so it needs an account which holds the amount of token you want to distribute. Then you need to fill out the config.json and run the bot.

I'm running the bot for you

When you have a token and a token sender account, you can provide me the configuration and the active key and i will add both to my running distribubot instance.

Installation

pip3 install distribubot

Edit the config.json and add the active key to beempy:

beempy createwallet
beempy addkey

the bot can then be started by

distribubot /path/to/config.json --datadir=/writeable_datadir/

A data file is stored at /writeable_datadir.

Configuration

OptionValue
token_accountsteem account name, which should distribute the token
symboltoken symbol, which should be distributed
token_memomemo which is attached to each token transfer
replywhen true, a reply comment is broadcasted
wallet_passwordContains the beempy wallet password
no_broadcastWhen true, no transfer is made
min_staked_tokenMinimum amount of token a comment writer must have
maximum_amount_per_commentMaximum Amount of token that will be send at once
token_in_wallet_for_each_outgoing_tokenLimits the amount of token a user can send every 24 hours
user_can_specify_amountWhen true, the user can specify the amount to send up to maximum_amount, when false maximum_amount is always sent
default_amountDefault amount of token
sucess_reply_bodyReply body, when token are send
no_token_left_for_todayReply body, when the user has not sufficient token in its wallet
fail_reply_bodyReply body, when no token are sent (not min_staked_token available)
no_token_left_bodyReply body, when no token are left to send
comment_commandCommand which must be included in a comment, to activate the bot
usage_upvote_percentageWhen set to a percentage higher than 0, the comment with the command will be upvoted by the scot_account

Example

Lets assume we want to distribute PIZZA token by pizzalover. 10000 PIZZA should be distributed, so 10000 PIZZA are issued to pizzalover. The active key of pizzalover is stored in beempy. Only user how have 5 PIZZA token in their wallet should use the bot and they should be able to send 1 PIZZA per day for every 5 TOKEN they have. The maximum amount should 3 PIZZA to send at once. The command should be ``!PIZZA`.

When a user has 5 PIZZA, he can send 1 PIZZA per day by !PIZZA or !PIZZA 1. When a user has 50 PIZZA, he can write 10 comments with !PIZZA every day or 5 comments with !PIZZA 2.

{
        "config": [{
        "token_account": "pizzalover",
        "symbol": "PIZZA",
        "token_memo":"You got a Pizza",
        "reply": true,
        "sucess_reply_body": "Hey @{}, here is your tasty PIZZA.",
        "fail_reply_body": "Sorry, you need at least 5 PIZZA to give PIZZA to others.",
        "no_token_left_body": "Sorry, out of PIZZA, please retry later...",
        "no_token_left_for_today": "You need to own more PIZZA (5 PIZZA in your wallet allows you to send 1 PIZZA per day)",
        "comment_command": "!PIZZA",
        "user_can_specify_amount": true,
        "default_amount": 1,
        "maximum_amount_per_comment": 3,
        "token_in_wallet_for_each_outgoing_token": 5,
        "min_token_in_wallet": 5,
        "usage_upvote_percentage": 0
        }],
        "no_broadcast": false,
        "print_log_at_block": 300,
        "wallet_password": "walletpass"
}

Accounts which are muted by the token_account are not allowed to use the bot.


Let me know if you need help or want to add your token to my running distribubot instance.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

This is really great to head about

@holger80 are you offering to run the comment based scot for free on behalf of us? I want it to be implemented for IND token

Hi @holger80!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your UA account score is currently 7.505 which ranks you at #53 across all Steem accounts.
Your rank has improved 1 places in the last three days (old rank 54).

In our last Algorithmic Curation Round, consisting of 279 contributions, your post is ranked at #1. Congratulations!

Evaluation of your UA score:
  • Your follower network is great!
  • The readers appreciate your great work!
  • Great user engagement! You rock!

Feel free to join our @steem-ua Discord server

This story was recommended by Steeve to its users and upvoted by one or more of them.

Check @steeveapp to learn more about Steeve, an AI-powered Steem interface.

Great job from a great blockchain programmer.

Thanks again for this work for the community

!BEER

I hate seeing new innovations like this, it only makes me want to buy more steem so I can have my own tribe and token lol! Keep it coming by the time I can launch mine I'm sure we're going to have a gang of new features

Let me know if you need help or want to add your token to my running distribubot instance.

I sent you a DM via Discord around 2 weeks ago RE this.. I guess you are busy.. but hope you can help.

I would love this facility.. please have a look at my message and hope we can get the wheels rolling.

Awesome! Thanks for your efforts.

Not sure I am fully comfortable with all the all the keys in one place and such...

I installed it though. I'll have to try to take a look at it a bit later, if I have the time...which I never do.

is this different than the bot distributing !SHADE 1?

No, your token is now also distributed by distribubot, if you like you can set token_in_wallet_for_each_outgoing_token

Posted using Partiko Android

sweet... thank you for all you do

Now hearing of !SHADE

Posted using Partiko Android



Hi {} you need at least 100 SHADE tokens to share
Visit steem-engine.com to Trade
Or, visit @shadeserver to learn how to earn SHADE

  ·  3 months ago (edited)

A !BEER in the shade

and some !SHADE 2 enjoy yours



Hi detlev the SHADE tokens are on the way.
Thanks for sharing SHADE
To view or Trade SHADE visit steem-engine.com

To view or trade BEER go to steem-engine.com.

Hey @shadeserver, here is your BEER token. Enjoy it!

To view or trade BEER go to steem-engine.com.

Hey @holger80, here is your BEER token. Enjoy it!

Hi, @holger80!

You just got a 3.89% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.



Hi holger80 the SHADE tokens are on the way.
Thanks for sharing SHADE
To view or Trade SHADE visit steem-engine.com

Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!

Now that's a good looking bot that I can trust.
Can't wait to see what clever things people do with this clever bot.

Giving out a !BEER is already possible :).

Wow, I know see the comment is inline! Much easier when demonstrated. Thanks for the drink!

Posted using Partiko Android

Cheers and Prost.

To view or trade BEER go to steem-engine.com.

Hey @abitcoinskeptic, here is your BEER token. Enjoy it!

Thanks for sharing your creativity and your services, dear @holger80!

Resteemed with joy

Posted using Partiko Android

How to know which token is using your bot?

Distribubot has started crashing regularly, and it currupts data.db when it does so I can’t restart it without deleting data.db first. I’ve updated Beem to your latest version - but it still happens - are you having the same issue on the installs you are maintaining?

Posted using Partiko iOS