新增#椰奶监控
This commit is contained in:
@@ -24,20 +24,19 @@ export class NewState extends plugin {
|
||||
}
|
||||
|
||||
async state (e) {
|
||||
if (!/椰奶/.test(e.msg) && !Config.Notice.state) return false
|
||||
|
||||
if (!State.si) return e.reply('❎ 没有检测到systeminformation依赖,请运行:"pnpm add systeminformation -w"进行安装')
|
||||
if (e.msg.includes('监控')) {
|
||||
let data = {
|
||||
chartData: JSON.stringify(_.every(_.omit(State.chartData, 'echarts_theme'), _.isEmpty) ? undefined : State.chartData)
|
||||
}
|
||||
return await puppeteer.render('state/monitor', {
|
||||
...data
|
||||
chartData: JSON.stringify(State.chartData)
|
||||
}, {
|
||||
e,
|
||||
scale: 1.4
|
||||
})
|
||||
}
|
||||
|
||||
if (!/椰奶/.test(e.msg) && !Config.Notice.state) return false
|
||||
|
||||
if (!State.si) return e.reply('❎ 没有检测到systeminformation依赖,请运行:"pnpm add systeminformation -w"进行安装')
|
||||
|
||||
// 防止多次触发
|
||||
if (interval) { return false } else interval = true
|
||||
// 系统
|
||||
|
||||
Reference in New Issue
Block a user