DiscoSteem-Bot update 0.3.1 - Management of optimized curation data.

in #utopian-io6 years ago (edited)

DiscoSteem-Bot is constantly evolving, in this update we have added several features that we will detail below.

DiscoSteem-Bot 0.3.1.png

Pull request preview

New features


  • $display-list : With this function you can now display the contents of the file (post-saved.json) containing all the selections of articles made by the curators.
  • $delete-post : With this function you can now delete an element contained in post-saved.json according to its ID.
  • $delete-all : This function resets the post-saved.json file to zero.
  • $count : This function simply counts the number of articles you have selected and which are in post-saved.json
  • $more-info : This feature will allow you to display a list of links to the most visited sites by Steemians. Of course you can mention an @ and the links will be displayed with your @ in the link, which will allow you to consult directly your information or that of any Steemians.
  • We also added a new filter on the StreamOp function, you can now follow the votes of an account on a specific tag. The bot will display a message in a channel that you have defined beforehand, with the different information on the voted article (voting weight, author and post link). To activate this function, simply configure the new parameters in the config.json file (trackerVoter and tagTrackerVoter)

Bug fixing


The setGame (deprecated ) function has been modified by the setActivity function.

About the new features


Once again I decided to modify the code structure to reduce the number of files present. In this new update you will notice the disappearance of almost all the files in the.actions/ folder.

Obviously the functions have not been deleted, on the contrary. By adding the new functions I realized that linking to all these files could quickly become complicated. So I decided to group all the functions in two separate files.

The first file discord-module.js contains all functions using the Discord API and the second file steem-module.js contains all functions using the Steem API.

This decision offers two advantages. The first advantage is that the cmd-bot.js file becomes a kind of safeguard that I would use in the future to process the data efficiently. The second advantage, which is the most interesting to me, is that now the dozen "require" in cmd-bot.js is no longer needed. You only need two "require" to have all the functions.

It didn't take me a lot of work because the code structure I chose to adopt in previous versions, makes the implementations and modifications much easier to rework.

Overview of changes


cmd-bot.js before

...
var getCreated = require("./steem-actions/created.js");
var getDiscussion = require("./steem-actions/discussionBFD.js");
var getRank = require("./steem-actions/ranking.js")
var getWallet = require("./steem-actions/wallet.js");
var curationSave = require("./discord-actions/curation-action.js");
var clear = require("./discord-actions/clear.js");
var reactionEmo = require("./discord-actions/reaction.js");
var displayList = require("./discord-actions/displayList.js");
var countList = require("./discord-actions/countList.js");
var deletePost = require("./discord-actions/deletePost.js");
var deleteAllPost = require("./discord-actions/deleteAllPost.js");
var moreInfo = require("./discord-actions/moreInfo.js")
...

cmd-bot.js after


...
var steemAction = require("./actions/steem-module.js");
var discordAction = require("./actions/discord-module.js");
...

Seeing this I think you will quickly understand my choice.

StreamOp


Stream's function has stayed in its place and has not migrated to steem-module.js for the moment I prefer to leave it there because it will evolve very soon.

I added to this function, the tracking of the account of your choice. This function sends a message to your Discord server as soon as the account you have chosen to track votes for an article on a specific tag.

I think this function is interesting for curative projects that bring together different communities. For example for the #fr statistics I don't need to retrieve the votes of the account to track on the #kr.

This is why you will notice the addition of two new parameters in config.json.

...
"trackerVoter" : "@ OF THE ACCOUNT TO BE TRACKED ",
  "tagTrackerVoter" : "fr"
...

Concerning the functions themselves, I suggest you discover them in detail in the next paragraph.

Application Overview


$display-list

preview-display-list-r.gif


$count

preview-count.gif


$delete-post

preview-delete-post.gif


$delete-all

preview-delete-all.gif


Niew function in the StreamOp

Sans titre (6).png

As you can see, you now have more power over data management. Before the update you could not delete an article submitted by mistake or view the contents of the post-saved.json file. You can now do all this with DiscoSteem-Bot 0.3.1

If you have a question about the new features, their implementation, their construction, their operation, do not hesitate to ask me your questions via the comments or by contacting me directly on Discord, you will find the link on my profile

Pull request preview

Next Steps


  • Refine the curations data by adding the value of the votes sent by the curation account.
  • $upvote function that will be available for the best authors
  • Communication between several Discord servers (under construction)
  • Publication of curing article directly from Discord (under construction)

Contribution


Don't hesitate to contact me on Discord or Github if you would like to contribute to the project or if you need help setting up the bot.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Un grand merci pour cette source.

Toujours avec grand plaisir @as31 ! :-) Merci pour ton commentaire !

Great job, you gave me tips for later :) You speak very well English compared to some French ! ;)

Great tool and great improvements!
Good job @planetenamek.

Thank @hightouch! And we're gonna keep trying to add more :-) !

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Thanks for the review :-) .

Hey @planetenamek I am @utopian-io. I have just upvoted you!

Achievements

  • People loved what you did here. GREAT JOB!
  • Seems like you contribute quite often. AMAZING!

Utopian Witness!

Participate on Discord. Lets GROW TOGETHER!

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

Congratulations @planetenamek! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of comments

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

Upvote this notification to help all Steemit users. Learn why here!

This post has been just added as new item to timeline of DiscoSteem on Steem Projects.

If you want to be notified about new updates from this project, register on Steem Projects and add DiscoSteem to your favorite projects.

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.032
BTC 61275.32
ETH 2983.86
USDT 1.00
SBD 3.76