mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 17:35:34 +00:00
对V3下的MysInfo错误信息增加频度控制
This commit is contained in:
parent
4f3cd1c93f
commit
b8a5d29aae
@ -47,7 +47,18 @@ class Mys {
|
|||||||
if (!this.MysApi) {
|
if (!this.MysApi) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
let e = this.e
|
||||||
|
// 防止错误信息刷屏
|
||||||
|
e._original_reply = e._original_reply || e.reply
|
||||||
|
e.reply = function (msg) {
|
||||||
|
if (!e._isReplyed) {
|
||||||
|
e._isReplyed = true
|
||||||
|
e.reply = e._original_reply
|
||||||
|
return e._original_reply(msg)
|
||||||
|
}
|
||||||
|
}
|
||||||
let ret = await MysInfo.get(this.e, api, data)
|
let ret = await MysInfo.get(this.e, api, data)
|
||||||
|
e.reply = e._original_reply
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user