关于事件冷却时间的讨论 #2
jks15satoshi
started this conversation in
通用
Replies: 1 comment 9 replies
-
|
意思是用户调用频率限制? |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
在翻阅现有 Nonebot 2 的 API 文档后,我并没有发现有关事件触发冷却时间的调用接口(应该是没有,如果有的话麻烦骂醒我)。
那么如果要自己手动实现事件冷却时间判定,有没有一个比较好的解决方案?我自己的想法是在每次事件被触发时在
Matcher.finish()执行前记录当前时间,通过自定义Rule判断是否在 CD 时间范围内,但感觉有点麻烦。另外未来 Nonebot 会不会考虑加入这个特性?
Beta Was this translation helpful? Give feedback.
All reactions