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 {
|
2023-11-08 03:03:36 +08:00
|
|
|
constructor () {
|
2023-03-04 14:30:13 +08:00
|
|
|
super({
|
|
|
|
name: '体力查询',
|
|
|
|
dsc: '体力查询',
|
|
|
|
event: 'message',
|
|
|
|
priority: 300,
|
|
|
|
rule: [{
|
2023-05-07 03:32:08 +08:00
|
|
|
reg: '^#*(原神|星铁)?(体力|树脂|查询体力)$',
|
2023-03-04 14:30:13 +08:00
|
|
|
fnc: 'note'
|
|
|
|
}]
|
|
|
|
})
|
|
|
|
|
|
|
|
this.set = gsCfg.getConfig('mys', 'set')
|
|
|
|
}
|
|
|
|
|
|
|
|
/** #体力 */
|
2023-11-08 03:03:36 +08:00
|
|
|
async note () {
|
2023-03-04 14:30:13 +08:00
|
|
|
let data = await Note.get(this.e)
|
|
|
|
if (!data) return
|
|
|
|
|
|
|
|
/** 生成图片 */
|
2023-11-08 03:03:36 +08:00
|
|
|
this.renderImg('genshin', `html/player/daily-note-${data.game}`, data)
|
2023-03-04 14:30:13 +08:00
|
|
|
}
|
2023-12-22 22:56:11 +08:00
|
|
|
}
|