同步 Miao-Yunzai 更新

This commit is contained in:
🌌 2023-06-04 12:42:01 +08:00
parent 9e9073971e
commit 17406bd8db
1 changed files with 13 additions and 0 deletions

View File

@ -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
}