Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 0.3.1 #5

Merged
merged 28 commits into from Apr 12, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
b241c2e
Rename folder /actions --> steem-actions
Apr 9, 2018
ceaa331
Added folder ./steem-actions
Apr 9, 2018
fe1b470
Preparation of module files for migration of all functions
Apr 9, 2018
57a66a1
Preparation of module files for migration of all functions
Apr 9, 2018
b5c1e5d
Added structure and 4 functions on discord-module.js
Apr 9, 2018
4c8ddf1
Added the first fonction in steem-module.js
Apr 9, 2018
c7fc18c
Migration from and -post on steem-module.js
Apr 9, 2018
347b60b
Migration from on steem-module.js
Apr 9, 2018
7b7b3eb
discussionBFD.js deleted
Apr 9, 2018
1240d7d
Migration from upvote.js on steem-module.js
Apr 9, 2018
55161e4
Migration from wallet.js on steem-module.js
Apr 9, 2018
975a398
Migration from curationSave.js on discord-module.js
Apr 9, 2018
8d9a965
Migration from curationSave.js on discord-module.js
Apr 9, 2018
72697e5
Added curation data processing
Apr 9, 2018
0c2306d
Added clear and count functions
Apr 9, 2018
67f4e48
Update all routes of functions
Apr 9, 2018
820a3ff
Update info.json with descriptions of new functions
Apr 9, 2018
24fd059
Update version of application
Apr 9, 2018
c8ec369
Update config.json
Apr 9, 2018
e3642a7
Finish review app.js
Apr 11, 2018
7607516
Finish review discord-module.js
Apr 11, 2018
47bb1d0
Finish review steem-module.js
Apr 11, 2018
71362cd
Finish review streamOp.js and and added the vote tracking function
Apr 11, 2018
406aff1
Finish review cmd-bot.js
Apr 11, 2018
adfba8b
Update README.md
planetenamek Apr 11, 2018
3070c0b
Update README.md
planetenamek Apr 11, 2018
7ec69d0
Change setGame (depreciated ) to setActivity
planetenamek Apr 12, 2018
3fe1a8f
Update README for update 0.3.1
planetenamek Apr 12, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
63 changes: 35 additions & 28 deletions README.md
@@ -1,60 +1,63 @@
# DiscoSteem-Bot (0.2.1)
# DiscoSteem-Bot (0.3.1)

**A Discord bot that interacts with the Steem blockchain API**

## Release 0.2.1
## Release 0.3.1

### New implementations

DiscoSteem-Bot now offers an upvote system from your Discord server. To vote for an article you can simply add a reaction,that you have previously defined, to a Steemit/Busy link.
DiscoSteem-Bot is constantly evolving, in this update we have added several features that we will detail below.

The curate function has been improved to allow data to be stored in a JSON file. This allows simple data reuse and also allows more efficient processing.
- $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)

> The $curate function now offers two services depending on the channels you have configured.

#### For all users:

Configure in config.json the parameter **postSubmissionChan** all links and descriptions posted on this channel will go directly to the channel you configured with **savingSubmissionChan**.

#### For moderators and curators

Configure in config.json the parameter **curationChan** all links and descriptions posted on this channel will go directly to the channel you have configured with **savingChan**.

In addition to being saved in a different channel, the data will be saved in the file **post-saved.json** which will allow you to process them much more quickly and simply.
### Bug fixing

**WARNING** : For more consistency think of configuring the permissions of your **curationChan** so that nobody can write there, but simply add reactions. This will allow you to have a very clean channel and therefore a better visibility to view the selected articles.
- The setGame (deprecated ) function has been modified by the setActivity function.

We have implemented the $rank function to display a Steem user's rank. The function calculates the VEST and returns the rank and number of VEST remaining to reach the next level.
### About the code

### Bug fixing
Compared to version 0.2.1, we have reviewed the entire code architecture. You will notice in the./actions/ folder that we have added two:

Stream's function was struggling to last over time. We have corrected the major problems and now you can Streamer the Steem blockchain without interruption.
- discord-module.js
- steem-module.js

We also added a function allowing the bot to detect its disconnection, which allows us to restart it immediately.
The functions being more and more numerous, we wanted to keep a clear code. You will therefore find in each file the functions specific to each platform (steem, discord). This makes it easier to read and add new functions.

We've added a feature that allows you to delete messages quickly and easily. With the $clear function add the number of messages (max 100) to delete and the bot will clean your Discord channel in a split second.
You will notice in particular that the code in cmd-bot.js is much clearer because we no longer have this gigantic list of "require".

## Function of the bot

**To make it simple, here is the result of the **$help** command from DiscoSteem-Bot, you will find all the features supported for the moment.**

- **$last-post** followed by the author of your choice, displays the link to the author's latest article.
- **$created** takes two parameters separated by spaces. the first one is the tag you want to display
- **$created** takes two parameters separated by spaces. the first one is the tag you want to display.
and the second one is the number (min = 1, max = 15) of items to display.
***This option is reserved for the administrator and anyone who has permission to edit a channel.***
- **search** does an article search based on the parameters you specify. ***- Ex: $search planetenamek fr 30 -*** will search in my last 30 articles and return all articles containing the tag **FR**
- **$search** does an article search based on the parameters you specify. ***- Ex: $search planetenamek fr 30 -*** will search in my last 30 articles and return all articles containing the tag **FR**.
- **$bal** displays the wallet of the Steem account of your choice. ***- Ex: $bal planetenamek -*** will display my wallet.
***Each command ($...) that requires a parameter must be separated by a space***
- **$curate_Description of your post here_Full Steemit link to your post** saves those information on "curateChan" or on "savingSubmissionChan"
- **$clear** deletes messages from the channel you are on. **- Ex : $clear 30 -**
- **$rank** Displays the rank of the user of your choice. (minnow, dolphin, orca)
***Each command ($...) that requires a parameter must be separated by a space***.
- **$curate_Description of your post here_Full Steemit link to your post** saves those information on "curateChan" or on "savingSubmissionChan".
- **$clear** deletes messages from the channel you are on. **- Ex : $clear 30 -**.
- **$rank** Displays the rank of the user of your choice. (minnow, dolphin, orca).
- **$display-post** Displays the contents of the post-saved.json file.
- **$delete-post** Delete a post present in post-saved.json according to its ID.
- **$delete-all** Deletes all content in post-saved.json.
- **$count** Count the number of elements present in post-saved.json
- **$more-info** Displays a link list containing many related Steem accounts (steemitboard, steemworld etc..)

### StreamOperation

You can now display the Steemit articles of your choice directly on your Discord server. Change the settings to suit your needs in the **config.json**.

You can specify **a single principalTag** and as **many altTags as you like**. The bot will sort the articles and send them to the channels you specify in the **config.json** file.

You can also track the votes of the account you use for post steem curation on a specific tag. The bot will display a message on the channel you have chosen. This message will contain the different information about the vote in question.

## Install

You will need a Node JS environment
Expand Down Expand Up @@ -95,7 +98,9 @@ Don't forget the basic safety measures, here is a little reminder.
"voterID" : "YOUR USER DISCORD ID",
"weightVote" : 10000,
"wif" : "YOUR PRIVATE POSTING KEY",
"voter" : "YOUR STEEM USERNAME"
"voter" : "YOUR STEEM USERNAME",
"trackerVoter" : "@ OF THE ACCOUNT TO BE TRACKED ",
"tagTrackerVoter" : "fr"
}
```

Expand All @@ -108,3 +113,5 @@ If you manage your own server we recommend using pm2
## More informations

https://steemit.com/utopian-io/@planetenamek/discosteem-bot-update-0-2-1-back-up-your-curation-data-upvote-with-reaction-and-more

Nous vous rappelons que vous pouvez tester ce bot sur ce serveur --> https://discord.gg/qbqP3
36 changes: 0 additions & 36 deletions actions/content.js

This file was deleted.

24 changes: 0 additions & 24 deletions actions/created.js

This file was deleted.

50 changes: 0 additions & 50 deletions actions/curationSave.js

This file was deleted.