Git Product home page Git Product logo

koishi-plugin-sleep-manage's Issues

Plan: 2.0.0

Bugfix

  • 消息未响应 (#7)
  • 重复播报的排名 (#6)
  • 开启 morning 时未正确响应当天第一条消息 (#6)
  • 睡眠时长未计算 (#6)

Refactor

  • 指令化响应
  • 加入中间件-指令模式
  • 重构数据库结构
  • 全局 / 频道 / 群组 / 用户 逐级时区配置
  • 加入指令

Bugs: 一些bugs

image
这张图汇聚了两个bug,一个是时区不生效,另一个是排名反复播报。

  1. 时区方面你已经选择了下个版本弃用,暂且不谈。
  2. 排名更新理应在当且仅当排名变动时播报,而不是一直播报。但这会涉及到另一个问题,如果两个人晚安后聊天,将会反复触发排名变动而无限播报。所以我认为下个版本中你可以同时弃用排名变动后的播报。

image
这张图也同样汇聚了两个bug,一个是automorning错误响应,一个是睡眠时间未统计。

  1. 根据我的消息记录,群友未在前一天发言,但触发了automorning,当然不排除我丢消息的可能。
  2. 睡眠时间未统计,正常应当有提示但很多时候没有。

还是不会用这个插件,感觉启用了没什么改变

Feature: 一些想法

一、增加数据统计

  1. 可以让bot统计用户这个月平均睡眠时间,并使用指令查看,增加用户按时发早安晚安的动力。例如:
    #睡眠时间记录:
  • 本月你共睡眠144小时,平均睡眠时间12小时,你是猪吗这么能睡!
  • 本月你共睡眠48小时,平均睡眠时间4小时,快睡觉啦小心猝死!
    延伸:每个人可以设置自己的最迟睡觉时间#开启晚安提示(也可以是平均记录的n小时后?),超出这个时间如果没有发晚安,则bot自动艾特他并发送“快睡觉啦小心猝死!”。
  1. 睡眠时间排名,虽然我不知道有没有意义(?)

二、简化流程,增加只发送晚安,自动侦测早安的开关(总开关/各群独立皆可)

逻辑思路例如:发送晚安后自动侦测下一条任意消息记录,若为1小时内则刷新时间记录,直到下一条消息间隔为3小时以上(不要求为早安),bot发送“早安!你的睡眠时间是10小时10分钟,你是今天第10个起床的”。

三、增加更多匹配词(配置项(总开关/各群独立皆可))

例如(以下皆摘自atri):
"早安", "早哇", "早上好", "ohayo", "哦哈哟", "お早う", "早好", "早", "早早早"匹配早安;
"晚安", "oyasuminasai", "おやすみなさい", "晚好", "晚上好"匹配晚安。

延伸:在响应早安晚安时可以输出一些根据时间的随机文案。
例如(以下改自atri):
“啊......早上好...(哈欠),今天你睡了6小时6分钟,呼啊啊~~~~再多睡会儿吧~”
“早个啥?今天你睡了12小时,你是猪吗这么能睡!哼!我都准备洗洗睡了!”
虽然这么写的话较难配置(当前时间前缀+睡眠时间匹配文案+当前时间后缀),总之提供一个思路,具体实现加油(

四、配置时区

用户可以设定自己的时区,来调整睡眠统计响应时间的偏移值。


以上都是个人想法举例,随意更改,加油!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.