Skip to content
This repository was archived by the owner on Mar 29, 2026. It is now read-only.

haoshiyou/haoshiyou2023

Repository files navigation

Haoshiyou-Bot

Powered by Wechaty

A chat bot supported on WeChaty, managing the HaoShiYou wechat groups run by volunteers of haoshiyou.org

Quick Start

To start running in a docker

docker run --env CLOUDINARY_SECRET=$CLOUDINARY_SECRET -ti --volume="$(pwd)":/bot --rm zixia/wechaty src/main.ts

Update Docker

brew unlink yarn
brew install yarn
docker pull zixia/wechaty

Query server link

http://haoshiyou-server-dev.herokuapp.com/api/HsyListings?filter={%22where%22:%20{%22uid%22:%22group-collected-%E5%91%A8%E8%BD%BD%E5%8D%97%22}}

Or http://haoshiyou-server-dev.herokuapp.com/api/HsyListings?filter={%22where%22:%20{%22uid%22:%22group-collected-%E5%91%A8%E8%BD%BD%E5%8D%97%22}}

Work with git submodules

We use submodules for haoshiyou-ai

Move path of a module

We use

git mv old/submod new/submod

submodule from haoshiyou-ai

git submodule add git@github.com:xinbenlv/haoshiyou-ai.git v1/haoshiyou-ai

pull

git pull --recurse-submodules

Roadmap

  • Basic function

    • Auto-accept Friend Request
    • Detect user group-join intention to add to a specific group
    • Delete user when groups approach to max member limit - say, 480 members.
      • Never delete group admins (a whitelist).
      • Delete the first 30 members that are not renaming their nick names in the designated format.
      • Delete the first 10 members that was added to the group the earliests.
    • Privately poked group members who haven't update the group nickname.
    • [P] Automatically delete friends if approaching 5000 friends cap. Postponed: current version of web client does not support deleting, so we can't do it
  • Logging

    • Logging chat data for future research.
  • Integration function

    • Auto-detect an user is posting a listing of for rent or find home.
    • Append all pictures to the listing
    • Add information about area and type
    • Post to Haoshiyou-Server
    • Store Contact's Avatar, stably
    • Design some admin's commandline
  • Advance function

    • Extract time, price, type from a list post
    • Based on conversation session state, extract photos posted followed by the previous post.
    • Post to Haoshiyou-Server with extracted information, and create account.
  • Management Function

    • Kick a group member if received kicking instruction from a group and add blacklist
    • Honor black list in the remarks
    • Whoever is trying to invite a blacklisted user will be blacklisted and kickout as weel
  • Productivity

    • Hot reload typescript
    • Refactor the code to split each event handler into a separate file

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors