Miao-Yunzai/plugins/genshin/apps/dailyNote.js

36 lines
801 B
JavaScript
Raw Normal View History

2023-03-04 14:30:13 +08:00
import plugin from '../../../lib/plugins/plugin.js'
import Note from '../model/note.js'
import gsCfg from '../model/gsCfg.js'
import puppeteer from '../../../lib/puppeteer/puppeteer.js'
gsCfg.cpCfg('mys', 'set')
export class dailyNote extends plugin {
constructor () {
super({
name: '体力查询',
dsc: '体力查询',
event: 'message',
priority: 300,
rule: [{
reg: '^#*(原神|星铁|崩坏星穹铁道|铁道)?(体力|树脂|查询体力)$',
2023-03-04 14:30:13 +08:00
fnc: 'note'
}]
})
this.set = gsCfg.getConfig('mys', 'set')
}
/** #体力 */
async note () {
let data = await Note.get(this.e)
if (!data) return
/** 生成图片 */
let img = await puppeteer.screenshot('dailyNote', data)
if (img) await this.reply(img)
}
}