This bot combines Steem-Python and Discord.py and can serve as a tool for Steemit curators. The bot is triggered by a comment from the curator and the Steemit URL is sent to a channel in Discord.
As the code combines Steem blockchain and Discord functionalities, it can act as a base for building a Discord & Steem bot. Some demo commands are included to showcase this. Please see below for more info.
Setup & Requirements
Please see GitHub for information about requirements and setup.
How it works
The bot will connect to the discord server and in parallel start to stream blocks from the steem blockchain.
The bot will listen to any comment made with the word !curate. You can change this trigger word in the setup variables in curatebot.py. The trigger word can be written mixed with other words, it doesn’t need to be on its own. You can also decide to delete the comment as soon as you posted it.
If the the reply is from one of the preconfigured curators, the bot will send the Steemit URL to the predefined Discord channel.
Potential extensions
Inputs via discord could be used to integrate with certain aspects of the bot.
For example:
- Inputs could be used to add and delete names from the curator list.
- Commands for statistics purposes.
- Classify, group or delete URLs based on curator reviews.
- Integration with an upvote bot to automatically vote based on classification in the bullet point above.
Demo Functionality
The Steemit curation functionality of the bot doesn’t really require any interaction via Discord, its only function is to post the URL into a channel. But to show what is possible, I have included a sample menu with one additional command.
?help will open the menu below.
?top10 will make a simple query to the blockchain and return the Top10 utopian-io posts with the highest payout value.
This can pretty much be customized to do any action with Steem data, or any other 3rd party data, and allow interaction with Discord.
One use case could be to automate announcements based on external events. For example, the bot could automatically promote events in a discord channel based on google calendar entries.
Another use case is for users frequently querying for the same kind of data, like the STEEM/SBD ticker information shown below. 😂😂 This query could be implemented to run every 5 minutes and have the data posted in a private channel or in a direct message.
I hope you get an idea of what can be achieved.
Please let me know if you have any questions or suggestions.
Thank you for reading.
Posted on Utopian.io - Rewarding Open Source Contributors