#cn-malaysia bot: A bot that automates moderating cn-malaysia community

in #utopian-io7 years ago (edited)

stencil.default.jpg

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

In the past, me and @davidke20 are manually checking and advise the user that used #cn-malaysia without containing chinese content to not use this tag.

Features

  • What feature(s) did you add?

    • The bot will check when a post posted on steem with a tag of #cn-malaysia and then based on the content, calculate the amount of chinese words in it.
    • Current setting is 20%, if the user's post does not contain more than 20% of Chinese words, it will send in a comment to remind the user
      Screen Shot 2018-03-09 at 9.23.51 AM.png
  • How did you implement it/them?

    • Used of 2 regex to parse Chinese words
      • /[\u4e00-\u9fff]+/g used to calculate number Chinese words in the post.
      • /[\u00ff-\uffff]|\S+/g used to calculate the number of words in the post.
    • Based on the number of Chinese words to Total words, calculate the ratio. When the post does not meet the requirement, a comment is send out by @superoo7-dev (might change to @cn-malaysia in the future)

About Projects

  • What is the project about?
    This is a bot consuming SteemJS API. The bot will send out suggestion to those user that use #cn-malaysia without fulfilling the prerequisite (a certain amount of chinese words).

  • Technology Stack
    Node.js

  • Roadmap

    • Constantly update with SteemJS in terms of API changes.
    • add in parser to remove links, image and div tags to correctly calculate the ratio.
  • 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

Sort:  

Thank you for the contribution. It has been approved.

Two requests if you may:

  1. Please add the usual commands to run the bot not just up to creation of .env file
  2. Request: can you please create a tutorial on how to deploy a version of this for another tag of a community from setup of own vps (i'm assuming you're running this in a vps) to actualy deployment to the vps.

You can contact us on Discord.
[utopian-moderator]

Alright, I am sorry for the confusion. I had done update of the GitHub Repo.

Alright. Looks good.

Hey @eastmael, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

Hello @superoo7,

Thank you for having interest in using #cn-malaysia tag.

For your information, CN tag stands for Chinese, and MALAYSIA tag represents Malaysia and Malaysian authors.
Malaysians writing in Chinese are encouraged to use this tag for us to easily identify Malaysians and also a channel where we can announce all upcoming events in Malaysia.

Below are the criteria:

  1. Content with at least 40% of Chinese words authored originally by the blogger
  2. Translated content directly from translating tool does not count
  3. If the content has nothing concern to Malaysian, nor in Chinese language, do refrain from using the tag #cn-malaysia . Further usage would be deemed as tag abuse and further action would be taken.

Therefore, we recommended that do not use #cn-malaysia if the requirement is not met. Hence, there will not be any vote from our team.

Thank you for your understanding.

Best regards,
#cn-malaysia, #teammalaysia

You’ve been upvoted by TeamMalaysia Community :-

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

The new bot work pretty well. Thank you for your effort and contribution to made this happen.

Planned to do it few weeks ago, but we are not mature enough. Now seems to be a good time

Awesome! Thanks for all the hard work! Thanks @superoo7 and @davidke20!

You're welcome, maybe more projects in #cn-malaysia soon!

Cool! Looking forward to more projects!!!

太好了,希望别太多滥用cn-malaysia 的文章,让人啼笑皆非

希望如此,大家一起加油!

太好了。感谢你一直以来的付出!

希望可以看到更多有好的作品在#cn-malaysia。(虽然我很少po在#cn-malaysia)

Too bad 我不会华文。Good job for the community @superoo7

Thanks for your support 😁

谢谢分享,可以准备写我的游记了。

加油呵呵!

谢谢你一直以来的付出,@superoo7!!!!

感觉可以做成一个通用的,cn其他版块的都可以使用

还存在一点点bug,等我修完了再分享吧。

Hey @superoo7 I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

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

Hi there @superoo7, nice to meet u! Great effort on creating and maintaining the bot and cn-malaysia tag with @davidke20! May I know if cn-malaysia tag is strictly for posts related to malaysia? Let's say if i posted my thoughts in chinese, but it has nothing to do with malaysia, can i use the tag? Haha, i dun wan to get warn message for abusing the tag LOL

I would suggest you use cn-malaysia for malaysian chinese community or things related to malaysia, or you want the post to reach cn-malaysia community. Since you are from Malaysia, feel free to use, as long as there is chinese content

Alright, sure, thanks! :)

Great effort bro. Thank you for the contribution.

@superoo 兄弟你是最棒的,努力加油喔 :D

謝謝你哦也辛苦你!這樣就不會有人亂亂來了。