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
Option | Value |
---|---|
token_account | steem account name, which should distribute the token |
symbol | token symbol, which should be distributed |
token_memo | memo which is attached to each token transfer |
reply | when true, a reply comment is broadcasted |
wallet_password | Contains the beempy wallet password |
no_broadcast | When true, no transfer is made |
min_staked_token | Minimum amount of token a comment writer must have |
maximum_amount_per_comment | Maximum Amount of token that will be send at once |
token_in_wallet_for_each_outgoing_token | Limits the amount of token a user can send every 24 hours |
user_can_specify_amount | When true, the user can specify the amount to send up to maximum_amount, when false maximum_amount is always sent |
default_amount | Default amount of token |
sucess_reply_body | Reply body, when token are send |
no_token_left_for_today | Reply body, when the user has not sufficient token in its wallet |
fail_reply_body | Reply body, when no token are sent (not min_staked_token available) |
no_token_left_body | Reply body, when no token are left to send |
comment_command | Command which must be included in a comment, to activate the bot |
usage_upvote_percentage | When 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.
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:
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.
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!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
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!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!
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
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.
Great job from a great blockchain programmer.
Thanks again for this work for the community
!BEER
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.
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
Hello, I would like to use this to distribute WBT tokens.
I have it up and running but every time it tries to send a token it fails to complete the transaction.
It says;
WARNING - run: <class'AttributeError'> distribubot.py - 248
WARNING - run: Could not send WBT tokens
All accounts have WBT tokens as well as tokens staked. Not sure what I'm doing wrong and this is my first bot.
Still reading replies here? I want to set this up. Can you help me proceed? I sent a friend request on discord also.