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

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@planetenamek·
0.000 HBD
DiscoSteem-Bot update 0.3.1 - Management of optimized curation data.
DiscoSteem-Bot is constantly evolving, in this update we have added several features that we will detail below.

![DiscoSteem-Bot 0.3.1.png](https://cdn.utopian.io/posts/af9d6ba8b405fa843ce76fd261861871b4aaDiscoSteem-Bot_0.3.1.png)

### [Pull request preview](https://github.com/planetenamek/DiscoSteem-Bot/pull/5)

## New features 
<hr>

- **$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
<hr>

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

## About the new features
<hr> 

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](https://github.com/planetenamek/DiscoSteem-Bot/blob/master/actions/discord-module.js)** contains all functions using the Discord API and the second file **[steem-module.js](https://github.com/planetenamek/DiscoSteem-Bot/blob/master/actions/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](https://github.com/planetenamek/DiscoSteem-Bot/blob/master/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
<hr>

#### 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
<hr> 

```
...
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
<hr> 

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](https://github.com/planetenamek/DiscoSteem-Bot/blob/master/config-example.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
<hr>

**$display-list**

![preview-display-list-r.gif](https://cdn.utopian.io/posts/a5fd9055aa34b235838afeb462731c604f66preview-display-list-r.gif)

<hr>

**$count**

![preview-count.gif](https://cdn.utopian.io/posts/ca6332a6a6770d463f893ded67bfaeee9fa2preview-count.gif)

<hr>

**$delete-post**

![preview-delete-post.gif](https://cdn.utopian.io/posts/8838ca7b008cfa7c002f282f43900589a7d3preview-delete-post.gif)

<hr> 

**$delete-all**

![preview-delete-all.gif](https://cdn.utopian.io/posts/4537d11980283c5217ae49a1e4c0858ffdb6preview-delete-all.gif)

<hr>

**Niew function in the StreamOp**

![Sans titre (6).png](https://cdn.utopian.io/posts/950fa56a94b5de7928a70bf28482bfa49ed6Sans_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](https://github.com/planetenamek/DiscoSteem-Bot/pull/5)

## Next Steps
<hr>

- 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
<hr> 

Don't hesitate to contact me on [Discord](https://discord.gg/pqAh7) or Github if you would like to contribute to the project or if you need help setting up the bot.




<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@planetenamek/discosteem-bot-update-0-2-1-management-of-optimized-curation-data">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,