wechaty / go-wechaty

Go Wechaty is a Conversational SDK for Chatbot Makers Written in Go
https://github.com/wechaty/go-wechaty-getting-started
Apache License 2.0
480 stars 92 forks source link

统计小帮手(statistic genie) #21

Open suntong opened 4 years ago

suntong commented 4 years ago

统计小帮手(statistic genie)

发言排行榜鼓励积极参与者,用沉睡鞭策榜提醒不参与交流的用户,统计小帮手(statistic genie)能帮助群主更加有效的调动群成员的积极参与意识。

名词简介

每一个群成员都有以下(在统计区间内的)重要指数:

指数名称 含义 数据库字段名
贡献指数 发言总字数累计 word_total
爱心指数 发言后又撤回重新修改的总字数累计 correction_total
分享指数 除纯文字以外,任何其他分享的次数累计 share_count
热闹指数 贴表情包图的次数累计(表情包不统计在分享指数之中) ??_count

Plan

I plan to implement this once the go-wechaty project is usable.

This is just a blue-print for now, if anyone has any more interesting idea, please chip in. Feature planned in design phase would much easier than adding them later on when design is done.

Thanks

Planned commands

commands Explanation Plan/Implemented
sg-period set default reporting period from the command line. phase 1
sg-top give 发言排行榜, the top 10 (or 20 or defined value) of most participated users phase 1
sg-warn give 沉睡鞭策榜,the bottom 10 of least participated users, @ them when listing phase 1
sg-kick kick the person(s) given on the command line phase 2
sg-shovel kick bottom 10 of least participated users, @ them before kicking phase 2

Syntax

sg-period days-top [days-warn]

E.g.,

On second thought, I might not need this.

sg-top [number [period]]

E.g.,

sg-warn [number [period]]

E.g.,

sg-kick reason person [person...]

E.g., sg-kick "group rule violation" @him @her ...

Question(s)

Design considerations

huan commented 4 years ago

I'd like to suggest that we can move this issue to wechaty/whishlist because this is not related to the Go language?

suntong commented 4 years ago

It is actually indeed related to the Go language because that's what I'm planning to implement in.

Feel free to copy it there if you think it might stir up more discussion, :)

huan commented 4 years ago

Great to know it's Go related!

So I'm very happy to keep it in the Go Wechaty repository, and looking forward to reading the code of this great Go Bot!

fangmuke commented 4 years ago

hello,可能我最近在做的一个项目天梯符合你的一些需求,目前使用JavaScript,但我想之后可能会移植到Go,你的一些想法也给了我灵感,感谢!至于你的那个question,解应该是使用room.alias(contact),需要注意的是在使用之前应当使用room.sync()同步最新群组数据,否则可能出现获取群昵称错误。

suntong commented 4 years ago

Great!! So let me started then, but first will need to get a test token for that... was postponing because I was only given a week for the test token... will update...

suntong commented 4 years ago

QuickDBD-export.pdf