A welcome bot for local communities
Steem has a constantly growing user base, and this is the same with our local community: tr. Onboarding new users is a hard task to do it right, because, people register here after they see the "write stuff and get paid" kinda promotions.
A new user to steem is most likely confused, they generally don't read much the official FAQ, and jump into pushing content directly. Or, they don't know english well yet to understand things clearly.
We have a couple of guides written by community members in turkish. And we were giving these links to new users manually - which is a challenging task with the current growth rate with new users.
Since I have experience in parsing blocks in the chain, I have decided to code a simple welcome bot. It does two simple things:
- Post links guide series in turkish
- Post links about "how not to post"
- Transfer 0.002 SBD to the user for they to register minnowsupport, banjo bots.
- Invites them to our community discord server.
Bot is triggered by comments. You can give a human welcome to the user, and comment @botaccountname !welcome. Then it wil post the welcome message.
Bot was in the test trial in the last couple of days and looks like it's working well.
It's open source
Repository: https://github.com/emre/communitybot
Installation
mkvirtualenv -p python3.6 communitybottestenv
pip install steem
pip install dataset
git clone https://github.com/emre/communitybot
cd communitybot
Configuration
You can use config.json.example as an example. Create a config.json file
using this and edit the parameters accordingly.
Parameters
keys
Bot account's and active private keys. If you don't plan to send welcome gifts,
then you can skip the active private key.
account
Bot's username in the steem network.
mysql_uri
Mysql connection string. Bot uses a mysql database to store welcome logs in order to
prevent duplicate welcome messages for same users.
nodes
RPC nodes in a list. I use https://rpc.buildteam.io personally.
welcome_message
This should point to a file formatted with markdown. Turkish example exists in the repository.
Make sure you enter the absolute file path here.
blacklisted_users
If some users abuse the bot, you can enter them into the list. Bot will ignore
the commands generated from these accounts.
send_welcome_gift
yes -> Send welcome git
no -> Don't send anything
welcome_gift
Welcome gift amount. Only need if you set send_welcome_gift as yes.
welcome_gift_message
Memo of the welcome_gift transfer.
After editing the configuration accordingly, you can run the bot as
python communitybot/communitybot.py /tmp/communitybot/config.json
And it will start listening transactions.
Supervisord config
To make sure bot process is alive and running, you can use supervisord. Here is my config for tr community bot:
[program:turbot]
command = /var/www/envrock/bin/python3.6 /home/emre/communitybot/communitybot/communitybot.py /home/emre/turbot.config.json
stdout_logfile = /var/www/turbot.log
stderr_logfile = /var/www/turbot.log
redirect_stderr = True
Feel free to raise questions if you plan to use it.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved.
You can contact us on Discord.
[utopian-moderator]
Emre Bey emeğinize sağlık. Sayenizde dahada bilinçlendim.
teşekkürler, amacımıza ulaşabildiysek ne mutlu.
Congratulations @emrebeyler! You have completed some achievement on Steemit and have been rewarded with new badge(s) :
Award for the total payout received
Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here
If you no longer want to receive notifications, reply to this comment with the word
STOP
STOP
İçimizden birilerinin böyle güzel projeler üretebiliyor olmaları ne güzel.. Başarılar dilerim..
teşekkürler.
Hey @emrebeyler I am @utopian-io. I have just super-voted you at 14% Power!
Suggestions https://utopian.io/rules
Achievements
Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x
Her oyla 50-100$ vermek bizi aşıyor en azından Utopian.io ile emeklerine bir nebze de olsa karşılık aldığını görmek bizi de mutlu ediyor.
Eline, zihnine sağlık.
Estf. Topluluk için yaptıklarım zaten bir karşılık beklenmeden yapılan şeyler. :)
very interesting, do you know anyone that runs these bots as a service?
You can run it yourself on a raspberry PI since it doesn't take much processing power.
https://steemit.com/technology/@niel96/fk5r5hlqw
Time is a river,this is 2 years old !BEER
View or trade
BEER
.Hey @emrebeyler, here is a little bit of
BEER
from @isnochys for you. Enjoy it!