Introducing Dorabot
Dear Steemit friends,
I have recently released my Steemit & Discord bot which I now present to you.
Please welcome
!
She might not look like much 😉 but she has some usable features which I hope you will enjoy. Features to view stats and perform various actions and searches on Steemit.
It all started out as a number of standalone scripts, created in python and running on a Linux Ubuntu machine. I created the python scripts utilizing the official steem python library, steem-python (https://github.com/steemit/steem-python).
One of my first scripts was built to help me keep track and stay in touch with my most important followers.
The Steemit feed page can quickly be cluttered, both with resteems and non-important posts. Even if you try to clean up in your follwers list, you might feel like myself, that some followers are more important, followers that would fit on a VIP list. For me, these are followers that consistently comments and upvotes my posts. And I want to make sure I stay in touch with them, to send some love back.
This script allowed me to input a list of my VIP followers and it returned a list of their most recent posts. Running this a few times every week I made sure I kept up a frequent contact without being forced to look through my Steemit feed.
As I became active in the Minnow Support Project and started to engage with other community members via Discord, via MSP's own server, PALnet, I thought these scripts would be a nice addition for our Discord server. So that was how the idea of came to life, a Steemit & Discord bot, ready to serve and promote Peace, Abundance & Liberty(PAL). 😉
Are you new to Minnow Support Project (MSP) and never heard of PALnet?
At the end of this post you will find a link with additional info about MSP and a link to connect to PALnet, MSP's Discord server.
See below screenshot to get an overview of 's Discord interface. The bot is active in most channels, but it is recommended to keep usage to the playingwithbots channel. Output in the general channel is prohibited to avoid spam and flooding of messages.
Activate with: ?help
Below I will give you a rundown of the feature described above, the feature that returns recent posts from your VIP followers.
Access it by running the ?curate command.
As described in ?help, the list of users should be separated with space or new line. So prepare a list of users and just paste it in after the ?curate command. At the end, you can add an optional number to indicate the number of posts to be fetched. You can return a maximum of 5 posts.
In the example below, you see me running the command, getting the 3 latest posts from: minnowsupport, danielsaori, aggroed and ausbitbank. I have also added a non-existing account, which will return an error message. So in case of a spelling mistake in your list, you can easily spot it. In this example, I have combined separating the names with both spaces and new lines.
Find below the extract of the python code for the main function. This is the function definition:
def getposts(user : str, postnr = 1):
It accepts a string for the username and an integer for the number of posts. In my main Discord bot, I'm looping through the list of users and calling this for each one. It is the also the code part of the Discord bot that limits the output to 5 posts. So there is no limit to the output in the code below.
Uncomment the last line in the code below if you want to try it out in a standalone python file. Just save it, for example: test.py, and execute it. Of course you need to have the steem-python library installed.
from steem import Steem
from steem.post import Post
from steem.account import Account
#Call function with a Steemit-username(string) and the number-of-posts(integer).
#The postnr variable is optional with a default value of 1.
def getposts(user : str, postnr = 1):
#Check if user is a real Steemit account.
try:
account = Account(user)
except Exception:
res = 0
else:
res = 1
#if real account.
if(res == 1):
s = Steem()
#Initiate an empty list.
postlist = ""
#Get 50 latest blog entries from the user. We fetch 50 as this will include reblogs.
posts = s.steemd.get_blog_entries(user,0, 50)
#Loop through all 50 posts.
for post in posts:
#Check that it is not a reblogged post.
if post['author'] == user:
#Fetch the Post object itself.
p = Post(post['author'] + '/' + post['permlink'])
#Format the url and add a timestamp.
url = "https://steemit.com/@" + post['author'] + "/" + post['permlink'] + " - " + p.created.ctime() + "\n"
#Add the url to the list.
postlist += url
postnr -= 1
#Stop the loop if we reached the wanted number of posts.
if postnr == 0:
break
return str(postlist)
#if fake account.
else:
return "Doesn't seem to be a valid Steemit account."
#Added it here for testing of the function.
#print(getposts("danielsaori", 3))
Thank you for reading!
Stayed tune for future updates.
Please let me know if you have any questions.
And please ping me (
) if you connect to Discord.

Proud member of #minnowsupportproject & #teamaustralia
Thank you @aggroed, @ausbitbank, @teamsteem,
@theprophet0, @someguy123, @canadian-coconut and @sirknight
Click HERE to learn more about Minnow Support Project.
Click HERE to connect to our Discord chat server.
