CN-Malaysia bot v2.0.0 release: Complete Rewrite, Added Testing, Added Whitelist, Remove duplicate comment
CN-Malaysia bot has been setup for 2 months, you can check the initial post where I shared about the aim of the bot. Since the release of the bot, there is a few complaints about it, so I managed to patch it and complete rewrite the whole project into TypeScript with dsteem library and added Testing with Jest.
Commit History
Bug Fixes
What was the issue(s)?
- [1] Duplicate similar comment because the bot watch for changes in post on Steem Blockchain.
- [2] No whitelist feature
What was the solution?
- [1] Create a json file called
data.json
to stored links that has been commented by the bot - [2] Whitelist feature added into
config.ts
[link on github]
- [1] Create a json file called
New Features
What feature(s) did you add?
How did you implement it/them?
- Since dsteem is written in TypeScript, dealing with Steem API is cleaner and easier, however there is still a feature of SteemJS being used, which is
steem.api.getContentAsync()
, since dsteem does not have this feature, will use steemjs for this one. - Testing is essential for the project to be scalable and easy to be develop. Jest is used in the bot.
- TypeScript offers compile time type check and helps a lot in the development progress in future.
- Since dsteem is written in TypeScript, dealing with Steem API is cleaner and easier, however there is still a feature of SteemJS being used, which is
Link to relevant lines in the code on GitHub and explain briefly what you added/changed.
About this Projects
- What is the project about?
#cn-malaysia is a tag for the chinese community in Malaysia. The aim is to get user to post quality chinese content. One of the issue sometimes is that people misunderstood about this tag and start to use it with posts that are not related to chinese content.
Before the creation of the bot, me and @davidke20 are manually checking and advise the user that used #cn-malaysia without containing chinese content to not use this tag.
- Technology Stack
TypeScript, Node.js, Jest, dsteem, steem-js
Roadmap
- Added test to add json file
- Update API when dsteem released a more suitable one
- Regex to parse out data from table from markdown, to correctly calculate the percentage of chinese words to english words.
How to contribute?
GitHub link
This project is on GitHub with MIT License, feel free to send in Pull Request or Issue Filling.
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for your contribution. You probably can submit a suggestion regarding dsteem.getContentAsync
There is a lot features also not available for dsteem. The last commit was February 2018, so I dun think the team are working on it.
Suggestion wise, need dug deeper into their API to see what's available and what's not.
Thanks for the approval
Cheering !
I think you can also introduce myMicrosteemit to the Malaysia steemitman if they use wechat . :D
Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.
[utopian-moderator]
I dun use wechat hahaha
Maybe I download and test your app and help you to promote.
Thanks for giving the score
Bravo and well done super.... 给你100个赞
你好cn区点赞机器人 @cnbuddy 感谢你对cn区作出成长的贡献。如果我打扰到你,请回复“取消”。
哇,🙏感谢 cn-buddy
You've been upvoted by TeamMalaysia community. Here are trending posts by other TeamMalaysia authors at http://steemit.com/trending/teammalaysia
To support the growth of TeamMalaysia Follow our upvotes by using steemauto.com and follow trail of @myach
Vote TeamMalaysia witness bitrocker2020 using this link vote for witness
Congratulations! This post has been upvoted by the communal account, @steemph.cebu by superoo7 being run at Teenvestors Cebu (Road to Financial Freedom Channel). This service is exclusive to Steemians following the Steemph.cebu trail at Steemauto. Thank you for following Steemph.cebu curation trail!
Don't forget to join Steem PH Discord Server, our Discord Server for Philippines.
Hey @superoo7! Thank you for the great work you've done!
We're already looking forward to your next contribution!
Fully Decentralized Rewards
We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.
Utopian Witness!
Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.
Want to chat? Join us on Discord https://discord.me/utopian-io