Welcome back, developers.
Greetings to all Steem enthusiasts! In today's lecture, we will learn how to install the beem library for interacting with the Steem blockchain, as well as how to cast a vote on a post.

Summary |
---|
We established the necessary environment for developing a Python-based Discord bot during our first lecture. In our second lecture we create a discord bot token, configure the bot and generate the invite link. We used the invite link and added the bot to our server. In our third lecture, we will bring the Community-Bot online in our local environment.
In the 4th lecture, we successfully developed our initial bot command, !info. We also learned how to create functions and retrieve data using the requests library in 5th lecture. We implemented the !info command in 6th lecture which is used fetch the information of any steem user.
In the 7th lecture, we learned how to send an embedded message with columns, images, and a profile image. In lecture 8th we learn how to generate a report for the community. In lecture 9th we learned how to develop a report and create a text file, then attach it to a Discord bot. In 10th lecture we learned how to get a single-author report for a community. In today's lecture, In 11th lecture learned how to install the beem library to interact with the Steem blockchain and how to case vote to a post.
In 12th lecture, we learned how to use the Beem Python library to send comments on a post. In today's lecture, we will learn how we can specify our app name using the options in the Comment metho in Beem library. When a user publishes a post or a comment our app name will be added to the JSON response of that post. Let's get started.
Procedure |
---|
- We will use the !send command which is already configured in the 12th lecture. We will add a parameter to the Comment method provided by the beem API.
response = comment.reply(body=body, author=utils.voter_username, meta={'app': 'steemlite/0.1.2'})
- We also need to make some fixes. The identifier is with @ so there is no need to write it again in the success message.
comment = Comment(authorperm=identifier, blockchain_instance=steem)
response = comment.reply(body=body, author=utils.voter_username, meta={'app': 'steemlite/0.1.2'})
if response.get('trx_id'):
await message.reply(f'Comment sent to https://www.steemit.com/{identifier}')
else:
await message.reply(f'Failed')
- Let's check if the app name is showing in the JSON response or not. Here is the direct JSON response link for the published comment.
https://steemit.com/hive-151113/@faisalamin/re-cast-a-vote-using-beem-20231009t103920z.json
Github |
---|
Steem Discord Bot Series |
---|
Lecture #1: Develop a Discord bot for your Steem Community
Lecture #2: How to Add a Bot to Your Discord Server
Lecture #3: Bring the Steem Discord Bot Online
Lecture #4: First Bot Command
lecture #5: Retrieving Steemit Account Information using SDS
Lecture #6: Implementing !info Command
Lecture #7: Discord Embed Reply with User Info
Lecture #8: Generate Community Report
Lecture #9: Attach Community Report
Lecture #10: Generate Author Report for Community
Lecture #11: Cast a vote using beem
Lecture #12: Comment in a post using beem
SteemPro Official |
---|
Download SteemPro Mobile
https://play.google.com/store/apps/details?id=com.steempro.mobileVisit here.
https://www.steempro.comSteemPro Discord
Official Discord Server
Cc: @blacks
Cc: @rme
Cc: @hungry-griffin
Cc: @steemchiller
Cc: @steemcurator01
Cc: @pennsif
Cc: @future.witness
Cc: @stephenkendal
Cc: @justyy
Best Regards @faisalamin
well done
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Congratulations, your post has been upvoted by @dsc-r2cornell, which is the curating account for @R2cornell's Discord Community.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit