Merge branch 'master' of https://gitee.com/kissnavel/Miao-Yunzai
This commit is contained in:
commit
636d75d179
|
@ -4,7 +4,7 @@ import fetch from 'node-fetch'
|
||||||
import MysInfo from '../model/mys/mysInfo.js'
|
import MysInfo from '../model/mys/mysInfo.js'
|
||||||
|
|
||||||
export class exchange extends plugin {
|
export class exchange extends plugin {
|
||||||
constructor () {
|
constructor() {
|
||||||
super({
|
super({
|
||||||
name: '兑换码',
|
name: '兑换码',
|
||||||
dsc: '前瞻直播兑换码',
|
dsc: '前瞻直播兑换码',
|
||||||
|
@ -23,7 +23,7 @@ export class exchange extends plugin {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
async getCode () {
|
async getCode() {
|
||||||
let reg = this.e.msg.match(/^(#|\*)?(原神|星铁|崩铁|崩三|崩坏三|崩坏3)?(直播|前瞻)?兑换码$/)
|
let reg = this.e.msg.match(/^(#|\*)?(原神|星铁|崩铁|崩三|崩坏三|崩坏3)?(直播|前瞻)?兑换码$/)
|
||||||
this.uid = '75276550'
|
this.uid = '75276550'
|
||||||
if (reg[1] == '*' || ['星铁', '崩铁'].includes(reg[2])) {
|
if (reg[1] == '*' || ['星铁', '崩铁'].includes(reg[2])) {
|
||||||
|
@ -76,7 +76,7 @@ export class exchange extends plugin {
|
||||||
await this.reply(msg)
|
await this.reply(msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
async getData (type) {
|
async getData(type) {
|
||||||
let url = {
|
let url = {
|
||||||
index: `https://api-takumi.mihoyo.com/event/miyolive/index`,
|
index: `https://api-takumi.mihoyo.com/event/miyolive/index`,
|
||||||
code: `https://api-takumi-static.mihoyo.com/event/miyolive/refreshCode?version=${this.code_ver}&time=${this.now}`,
|
code: `https://api-takumi-static.mihoyo.com/event/miyolive/refreshCode?version=${this.code_ver}&time=${this.now}`,
|
||||||
|
@ -105,7 +105,7 @@ export class exchange extends plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取 "act_id"
|
// 获取 "act_id"
|
||||||
async getActId () {
|
async getActId() {
|
||||||
let ret = await this.getData('actId')
|
let ret = await this.getData('actId')
|
||||||
if (ret.error || ret.retcode !== 0) {
|
if (ret.error || ret.retcode !== 0) {
|
||||||
return ''
|
return ''
|
||||||
|
@ -123,8 +123,16 @@ export class exchange extends plugin {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
let date = new Date(post.created_at * 1000)
|
let date = new Date(post.created_at * 1000)
|
||||||
date.setDate(date.getDate() + 1)
|
if (this.uid == '80823548') {
|
||||||
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
|
date.setDate(date.getDate() + 1)
|
||||||
|
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 23:59:59`
|
||||||
|
} else if (this.uid == '73565430') {
|
||||||
|
date.setDate(date.getDate() + 5)
|
||||||
|
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
|
||||||
|
} else {
|
||||||
|
date.setDate(date.getDate() + 3)
|
||||||
|
this.deadline = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} 12:00:00`
|
||||||
|
}
|
||||||
let structured_content = post.structured_content
|
let structured_content = post.structured_content
|
||||||
let result = structured_content.match(/{\"link\":\"https:\/\/webstatic.mihoyo.com\/bbs\/event\/live\/index.html\?act_id=(.*?)\\/)
|
let result = structured_content.match(/{\"link\":\"https:\/\/webstatic.mihoyo.com\/bbs\/event\/live\/index.html\?act_id=(.*?)\\/)
|
||||||
if (result) {
|
if (result) {
|
||||||
|
@ -134,7 +142,7 @@ export class exchange extends plugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 兑换码使用
|
// 兑换码使用
|
||||||
async useCode () {
|
async useCode() {
|
||||||
const cdkCode = this.e.msg.replace(/#(兑换码使用|cdk-u)/, '').trim()
|
const cdkCode = this.e.msg.replace(/#(兑换码使用|cdk-u)/, '').trim()
|
||||||
const res = await MysInfo.get(this.e, 'useCdk', { cdk: cdkCode })
|
const res = await MysInfo.get(this.e, 'useCdk', { cdk: cdkCode })
|
||||||
if (res) {
|
if (res) {
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
- from: '2024-05-08 06:00:00'
|
||||||
|
to: '2024-05-29 11:59:59'
|
||||||
|
five:
|
||||||
|
- 知更鸟
|
||||||
|
- 托帕&账账
|
||||||
|
four:
|
||||||
|
- 三月七
|
||||||
|
- 寒鸦
|
||||||
|
- 雪衣
|
||||||
|
name: 翼声纯律|落日条款
|
||||||
- from: '2024-04-17 12:00:00'
|
- from: '2024-04-17 12:00:00'
|
||||||
to: '2024-05-07 14:59:59'
|
to: '2024-05-07 14:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
- from: '2024-05-08 06:00:00'
|
||||||
|
to: '2024-05-29 11:59:59'
|
||||||
|
five:
|
||||||
|
- 夜色流光溢彩
|
||||||
|
- 烦恼着,幸福着
|
||||||
|
four:
|
||||||
|
- 无边曼舞
|
||||||
|
- 论剑
|
||||||
|
- 此时恰好
|
||||||
|
name: 流光定影|溯回忆象
|
||||||
- from: '2024-04-17 12:00:00'
|
- from: '2024-04-17 12:00:00'
|
||||||
to: '2024-05-07 14:59:59'
|
to: '2024-05-07 14:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
|
@ -1,3 +1,23 @@
|
||||||
|
- from: '2024-05-14 18:00:00'
|
||||||
|
to: '2024-06-04 14:59:59'
|
||||||
|
five:
|
||||||
|
- 流浪者
|
||||||
|
- 白术
|
||||||
|
four:
|
||||||
|
- 莱依拉
|
||||||
|
- 珐露珊
|
||||||
|
- 北斗
|
||||||
|
name: 久世浮倾|遵生合和
|
||||||
|
- from: '2024-04-24 06:00:00'
|
||||||
|
to: '2024-05-14 17:59:59'
|
||||||
|
five:
|
||||||
|
- 阿蕾奇诺
|
||||||
|
- 林尼
|
||||||
|
four:
|
||||||
|
- 菲米尼
|
||||||
|
- 琳妮特
|
||||||
|
- 香菱
|
||||||
|
name: 炉边烬影|光与影的戏术
|
||||||
- from: '2024-04-02 18:00:00'
|
- from: '2024-04-02 18:00:00'
|
||||||
to: '2024-04-23 14:59:59'
|
to: '2024-04-23 14:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
|
@ -1,3 +1,27 @@
|
||||||
|
- from: '2024-05-14 18:00:00'
|
||||||
|
to: '2024-06-04 14:59:59'
|
||||||
|
five:
|
||||||
|
- 图莱杜拉的回忆
|
||||||
|
- 碧落之珑
|
||||||
|
four:
|
||||||
|
- 勘探钻机
|
||||||
|
- 测距规
|
||||||
|
- 西风剑
|
||||||
|
- 雨裁
|
||||||
|
- 祭礼残章
|
||||||
|
name: 神铸赋形
|
||||||
|
- from: '2024-04-24 06:00:00'
|
||||||
|
to: '2024-05-14 17:59:59'
|
||||||
|
five:
|
||||||
|
- 赤月之形
|
||||||
|
- 最初的大魔术
|
||||||
|
four:
|
||||||
|
- 船坞长剑
|
||||||
|
- 便携动力锯
|
||||||
|
- 匣里灭辰
|
||||||
|
- 昭心
|
||||||
|
- 西风猎弓
|
||||||
|
name: 神铸赋形
|
||||||
- from: '2024-04-02 18:00:00'
|
- from: '2024-04-02 18:00:00'
|
||||||
to: '2024-04-23 14:59:59'
|
to: '2024-04-23 14:59:59'
|
||||||
five:
|
five:
|
||||||
|
|
2
trss.js
2
trss.js
|
@ -52,9 +52,9 @@ const qq = readYaml("config/config/qq.yaml")
|
||||||
|
|
||||||
exec("git remote add trss https://gitee.com/TimeRainStarSky/Yunzai")
|
exec("git remote add trss https://gitee.com/TimeRainStarSky/Yunzai")
|
||||||
exec("git fetch trss main")
|
exec("git fetch trss main")
|
||||||
exec("git reset --hard")
|
|
||||||
exec("git clean -df")
|
exec("git clean -df")
|
||||||
mv("config/config", "config/config_miao")
|
mv("config/config", "config/config_miao")
|
||||||
|
exec("git reset --hard")
|
||||||
exec("git checkout --track trss/main")
|
exec("git checkout --track trss/main")
|
||||||
rm("plugins/ICQQ-Plugin")
|
rm("plugins/ICQQ-Plugin")
|
||||||
exec("git clone --depth 1 --single-branch https://gitee.com/TimeRainStarSky/Yunzai-ICQQ-Plugin plugins/ICQQ-Plugin")
|
exec("git clone --depth 1 --single-branch https://gitee.com/TimeRainStarSky/Yunzai-ICQQ-Plugin plugins/ICQQ-Plugin")
|
||||||
|
|
Loading…
Reference in New Issue