同步 Miao-Yunzai 更新
This commit is contained in:
parent
9e9073971e
commit
17406bd8db
|
@ -62,6 +62,8 @@ class PluginsLoader {
|
|||
/** 插件监听 */
|
||||
this.watcher = {}
|
||||
|
||||
this.msgThrottle = {}
|
||||
|
||||
/** 星铁命令前缀 */
|
||||
this.srReg = /^#?(\*|星铁|星轨|穹轨|星穹|崩铁|星穹铁道|崩坏星穹铁道|铁道)+/
|
||||
}
|
||||
|
@ -657,6 +659,17 @@ class PluginsLoader {
|
|||
return false
|
||||
}
|
||||
|
||||
let { msgThrottle } = this
|
||||
|
||||
let msgId = e.user_id + ':' + e.raw_message
|
||||
if (msgThrottle[msgId]) {
|
||||
return false
|
||||
}
|
||||
msgThrottle[msgId] = true
|
||||
setTimeout(() => {
|
||||
delete msgThrottle[msgId]
|
||||
}, 200)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue