create account

list of bots: move list of bots into a separate file by justyy

View this thread on: hive.blogpeakd.comecency.com
· @justyy · (edited)
$25.43
list of bots: move list of bots into a separate file
![](https://utopian.io/img/utopian-logo-120x120.png)

I can see there are currently some other PR waiting to go in to the master branch on *utopian-bots.js* and there are some conflicts.

Maintaining a long list in the middle of a JS file which contains lots of logics is never a good idea. Thus, I have created a PR to move the list of bots into a separate file *list-of-bots.js*

The PR is at:  https://github.com/utopian-io/api.utopian.io/pull/34/files

Future contributions of adding/removing new bots are obviously dealing with this file only and this will reduce the number of conflicts.  And you can use use the following two lines of code to retrieve the list of bots, which is quite self-explanatory:

```
// get a list of bots
var list_of_bots = require('./list-of-bots.js');
var bots = list_of_bots.bots();   
``` 

This is the code refactoring, which is quite important as I believe.  This PR serves to *decouple* the changes of bots with the main logics of the utopian bot. Also, some other JS files can also read the bot list later without problems.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@justyy/list-of-bots-move-list-of-bots-into-a-separate-file">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjustyy
permlinklist-of-bots-move-list-of-bots-into-a-separate-file
categoryutopian-io
json_metadata"{"community":"utopian","app":"steemit/0.1","format":"markdown","repository":{"id":104593314,"name":"utopian.io","full_name":"utopian-io/utopian.io","owner":{"login":"utopian-io","id":18612062,"avatar_url":"https://avatars2.githubusercontent.com/u/18612062?v=4","gravatar_id":"","url":"https://api.github.com/users/utopian-io","html_url":"https://github.com/utopian-io","followers_url":"https://api.github.com/users/utopian-io/followers","following_url":"https://api.github.com/users/utopian-io/following{/other_user}","gists_url":"https://api.github.com/users/utopian-io/gists{/gist_id}","starred_url":"https://api.github.com/users/utopian-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utopian-io/subscriptions","organizations_url":"https://api.github.com/users/utopian-io/orgs","repos_url":"https://api.github.com/users/utopian-io/repos","events_url":"https://api.github.com/users/utopian-io/events{/privacy}","received_events_url":"https://api.github.com/users/utopian-io/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/utopian-io/utopian.io","description":"Utopian.io React Frontend","fork":false,"url":"https://api.github.com/repos/utopian-io/utopian.io","forks_url":"https://api.github.com/repos/utopian-io/utopian.io/forks","keys_url":"https://api.github.com/repos/utopian-io/utopian.io/keys{/key_id}","collaborators_url":"https://api.github.com/repos/utopian-io/utopian.io/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/utopian-io/utopian.io/teams","hooks_url":"https://api.github.com/repos/utopian-io/utopian.io/hooks","issue_events_url":"https://api.github.com/repos/utopian-io/utopian.io/issues/events{/number}","events_url":"https://api.github.com/repos/utopian-io/utopian.io/events","assignees_url":"https://api.github.com/repos/utopian-io/utopian.io/assignees{/user}","branches_url":"https://api.github.com/repos/utopian-io/utopian.io/branches{/branch}","tags_url":"https://api.github.com/repos/utopian-io/utopian.io/tags","blobs_url":"https://api.github.com/repos/utopian-io/utopian.io/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/utopian-io/utopian.io/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/utopian-io/utopian.io/git/refs{/sha}","trees_url":"https://api.github.com/repos/utopian-io/utopian.io/git/trees{/sha}","statuses_url":"https://api.github.com/repos/utopian-io/utopian.io/statuses/{sha}","languages_url":"https://api.github.com/repos/utopian-io/utopian.io/languages","stargazers_url":"https://api.github.com/repos/utopian-io/utopian.io/stargazers","contributors_url":"https://api.github.com/repos/utopian-io/utopian.io/contributors","subscribers_url":"https://api.github.com/repos/utopian-io/utopian.io/subscribers","subscription_url":"https://api.github.com/repos/utopian-io/utopian.io/subscription","commits_url":"https://api.github.com/repos/utopian-io/utopian.io/commits{/sha}","git_commits_url":"https://api.github.com/repos/utopian-io/utopian.io/git/commits{/sha}","comments_url":"https://api.github.com/repos/utopian-io/utopian.io/comments{/number}","issue_comment_url":"https://api.github.com/repos/utopian-io/utopian.io/issues/comments{/number}","contents_url":"https://api.github.com/repos/utopian-io/utopian.io/contents/{+path}","compare_url":"https://api.github.com/repos/utopian-io/utopian.io/compare/{base}...{head}","merges_url":"https://api.github.com/repos/utopian-io/utopian.io/merges","archive_url":"https://api.github.com/repos/utopian-io/utopian.io/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/utopian-io/utopian.io/downloads","issues_url":"https://api.github.com/repos/utopian-io/utopian.io/issues{/number}","pulls_url":"https://api.github.com/repos/utopian-io/utopian.io/pulls{/number}","milestones_url":"https://api.github.com/repos/utopian-io/utopian.io/milestones{/number}","notifications_url":"https://api.github.com/repos/utopian-io/utopian.io/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/utopian-io/utopian.io/labels{/name}","releases_url":"https://api.github.com/repos/utopian-io/utopian.io/releases{/id}","deployments_url":"https://api.github.com/repos/utopian-io/utopian.io/deployments","created_at":"2017-09-23T19:24:57Z","updated_at":"2017-11-16T08:48:57Z","pushed_at":"2017-11-16T18:36:15Z","git_url":"git://github.com/utopian-io/utopian.io.git","ssh_url":"git@github.com:utopian-io/utopian.io.git","clone_url":"https://github.com/utopian-io/utopian.io.git","svn_url":"https://github.com/utopian-io/utopian.io","homepage":null,"size":59317,"stargazers_count":19,"watchers_count":19,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":40,"forks":19,"open_issues":40,"watchers":19,"default_branch":"master","score":32.953587},"pullRequests":[],"platform":"github","type":"development","tags":["utopian-io","code-refactoring","utopian-bots"],"image":["https://utopian.io/img/utopian-logo-120x120.png"],"links":["https://github.com/utopian-io/api.utopian.io/pull/34/files","https://utopian.io/utopian-io/@justyy/list-of-bots-move-list-of-bots-into-a-separate-file"]}"
created2017-11-17 22:43:18
last_update2017-11-17 22:49:45
depth0
children9
last_payout2017-11-24 22:43:18
cashout_time1969-12-31 23:59:59
total_payout_value18.844 HBD
curator_payout_value6.588 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,252
author_reputation280,616,224,641,976
root_title"list of bots: move list of bots into a separate file"
beneficiaries
0.
accountespoem
weight121
1.
accountfreedom
weight650
2.
accountgood-karma
weight8
3.
accountjefpatat
weight58
4.
accountlafona-miner
weight13
5.
accountmisterdelegation
weight542
6.
accountned
weight537
7.
accountwackou
weight52
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id20,722,542
net_rshares14,030,293,924,284
author_curate_reward""
vote details (45)
@kanou ·
very good information Utopian.io -
properties (22)
authorkanou
permlinkre-justyy-list-of-bots-move-list-of-bots-into-a-separate-file-20171117t224503752z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2017-11-17 22:45:12
last_update2017-11-17 22:45:12
depth1
children0
last_payout2017-11-24 22:45:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length34
author_reputation-900,034,351,514
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,722,653
net_rshares0
@minnowpond ·
@royrodgers has voted on behalf of @minnowpond. 
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @minnowpond. 

                To receive an upvote send 0.25 SBD to @minnowpond with your posts url as the memo
                To receive an reSteem send 0.75 SBD to @minnowpond with your posts url as the memo
                To receive an upvote and a reSteem send 1.00SBD to @minnowpond with your posts url as the memo
properties (22)
authorminnowpond
permlinkre-list-of-bots-move-list-of-bots-into-a-separate-file-20171117t224753
categoryutopian-io
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-11-17 22:47:54
last_update2017-11-17 22:47:54
depth1
children0
last_payout2017-11-24 22:47:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length463
author_reputation13,239,048,956,578
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,722,803
net_rshares0
@minnowpond ·
@minnowpond1 has voted on behalf of @minnowpond. 
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @minnowpond. 

                To receive an upvote send 0.25 SBD to @minnowpond with your posts url as the memo
                To receive an reSteem send 0.75 SBD to @minnowpond with your posts url as the memo
                To receive an upvote and a reSteem send 1.00SBD to @minnowpond with your posts url as the memo
properties (22)
authorminnowpond
permlinkre-list-of-bots-move-list-of-bots-into-a-separate-file-20171117t225342
categoryutopian-io
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-11-17 22:53:42
last_update2017-11-17 22:53:42
depth1
children0
last_payout2017-11-24 22:53:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length464
author_reputation13,239,048,956,578
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,723,141
net_rshares0
@mooncryption ·
Thank you for your contribution.
_Personal Note_: Great job! This will be very useful in the future. 

[utopian-moderator]
👍  
properties (23)
authormooncryption
permlinkre-justyy-list-of-bots-move-list-of-bots-into-a-separate-file-20171117t225633686z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-17 22:56:33
last_update2017-11-17 22:56:33
depth1
children4
last_payout2017-11-24 22:56:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length122
author_reputation15,427,543,916,099
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,723,289
net_rshares4,983,909,254
author_curate_reward""
vote details (1)
@justyy ·
Thank you
properties (22)
authorjustyy
permlinkre-mooncryption-re-justyy-list-of-bots-move-list-of-bots-into-a-separate-file-20171118t090203590z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2017-11-18 09:02:06
last_update2017-11-18 09:02:06
depth2
children3
last_payout2017-11-25 09:02:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation280,616,224,641,976
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,758,601
net_rshares0
@espoem ·
Hi, can you change the repository to utopian-io/api.utopian.io? It was approved with this mistake.

[[utopian-moderator]][moderators]

[moderators]:  https://utopian.io/moderators
properties (22)
authorespoem
permlinkre-justyy-re-mooncryption-re-justyy-list-of-bots-move-list-of-bots-into-a-separate-file-20171118t140343872z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-18 14:03:45
last_update2017-11-18 14:03:45
depth3
children2
last_payout2017-11-25 14:03:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length179
author_reputation59,289,149,412,912
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,779,496
net_rshares0
@utopian-io ·
### Hey @justyy I am @utopian-io. I have just upvoted you at 9% Power!
#### Achievements
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Work on your followers to increase the votes/rewards. My vote is now primarily based on that, humans rule. Good luck!
- Wondering why other contributions got more? I introduced a competition factor. My vote is also based on how competitive the category used is.
#### Did you know?
- I am going to become the first Steem Community-Driven Witness. Follow me to know when!
**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**
properties (22)
authorutopian-io
permlinkre-justyy-list-of-bots-move-list-of-bots-into-a-separate-file-20171118t182500542z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2017-11-18 18:25:00
last_update2017-11-18 18:25:00
depth1
children0
last_payout2017-11-25 18:25:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length679
author_reputation152,955,367,999,756
root_title"list of bots: move list of bots into a separate file"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,802,462
net_rshares0