list of bots: move list of bots into a separate file
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.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for your contribution.
Personal Note: Great job! This will be very useful in the future.
[utopian-moderator]
Thank you
Hi, can you change the repository to utopian-io/api.utopian.io? It was approved with this mistake.
[utopian-moderator]
Thank you... but I can't change it now, the field is read-only in utopian https://utopian.io/write?draft=17995644
You already got the vote. You can edit your post here. Next time you need the correct repo.
You can contact us on Discord.
[utopian-moderator]
very good information Utopian.io -
@royrodgers has voted on behalf of @minnowpond.
If you would like to recieve upvotes from minnowponds team on all your posts, simply FOLLOW @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.
Hey @justyy I am @utopian-io. I have just upvoted you at 9% Power!
Achievements
Suggestions
Did you know?
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