Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

新功能请求 #5

Open
YYY-919 opened this issue Feb 25, 2023 · 6 comments
Open

新功能请求 #5

YYY-919 opened this issue Feb 25, 2023 · 6 comments
Labels
enhancement New feature or request

Comments

@YYY-919
Copy link

YYY-919 commented Feb 25, 2023

1、触发回复的CD
每个match有不同的CD时长设置,每个聊天(私聊或是群)独立CD

2、在replies中可以输入特殊的字段,能够解析出触发该match的人,来实现在回复中@。(似乎不是很有必要
例如,将{someone_qqid}处理过后变为这个人的QQ号,放入CQ码中实现@
或者说,直接使用特殊字段进行@,不转化为QQ号
然后遵循现在的一些特性,比如当type=plain时,不处理特殊字段......

谢谢!

@lgc2333 lgc2333 added the enhancement New feature or request label Feb 25, 2023
@lgc2333
Copy link
Member

lgc2333 commented Feb 25, 2023

关于第一个我想问一下 cd是match中的每一项拥有独立cd,还是整个match数组共享同一个cd
第二个的话 这个我之前也想搞,但是我懒( ,然后就想等着有人issue了再做

@YYY-919
Copy link
Author

YYY-919 commented Feb 25, 2023

关于第一个我想问一下 cd是match中的每一项拥有独立cd,还是整个match数组共享同一个cd

第二个的话 这个我之前也想搞,但是我懒( ,然后就想等着有人issue了再做

每一项匹配词,单独计算CD,每一项匹配词之间互不影响
换句话说,就是防止群友反复发送同一匹配词,导致群里消息爆炸
还有一点就是,如果处于CD中被触发的话,我觉得可以不要反馈(就是不要发送提示说还处于CD当中

@lgc2333
Copy link
Member

lgc2333 commented Feb 25, 2023

好 过几天写写看(我懒

@QAQQL
Copy link

QAQQL commented Mar 15, 2023

需要一个对单独的match指定群内(个人)使用的cd
具体的构想可能较为复杂,例如:
一个人1分钟只能访问一个指定的match n次,超过就停止回复
或者是一个群对一个指定match 的限制

由于关键词较为广泛,很容易出现大家聊着聊着机器人回复占了一半,尝试过使用正则来更精确的匹配,但实在回复触发词太普遍了

麻烦作者大大辛苦一下了

@lgc2333
Copy link
Member

lgc2333 commented Mar 15, 2023

我现在的构想是这样的,设置一个新的cooldown配置在ReplyEntry里,结构是这样的

class Cooldown(BaseModel):
    type: Literal["person", "group"] = "group" 
    """cd类型,person为每个人的cd,group为每个群的cd"""

    time: float
    """cd时长,单位秒"""

    tip: Optional[str] = None
    """正在cd中的提示,None或空字符串为不提示"""

目前只考虑了自动回复的固定cd,如果你们有有限定时间内限定调用次数的需求的话,那我会再考虑考虑

总之,等我空出时间了,我再开始写

@lgc2333
Copy link
Member

lgc2333 commented Apr 23, 2023

变量已在 v0.2.6 更新,查看文档获取详细用法

最近新上线了 回复市场,欢迎来看看~

@lgc2333 lgc2333 reopened this Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants