Merge branch 'master' of github.com:yoimiya-kokomi/Miao-Yunzai

This commit is contained in:
Kokomi 2023-04-11 02:06:25 +08:00
commit d1985e3b9c
38 changed files with 171 additions and 36 deletions

View File

@ -5,11 +5,11 @@ services:
build: # 使用 Dockerfile 本地构建
context: ./docker
args:
BUNDLE_FFMPEG: false # 是否在构建时打包 ffmpeg
BUNDLE_POETRY: false # 是否在构建时打包 poetry
USE_APT_MIRROR: true # 是否在构建时使用 apt 镜像
USE_NPM_MIRROR: true # 是否在构建时使用 npm 镜像
USE_PYPI_MIRROR: true # 是否在构建时使用 pypi 镜像
BUNDLE_FFMPEG: 'false' # 是否在构建时打包 ffmpeg
BUNDLE_POETRY: 'false' # 是否在构建时打包 poetry
USE_APT_MIRROR: 'true' # 是否在构建时使用 apt 镜像
USE_NPM_MIRROR: 'true' # 是否在构建时使用 npm 镜像
USE_PYPI_MIRROR: 'true' # 是否在构建时使用 pypi 镜像
restart: always
# ports:
# - "50831:50831" # 映射锅巴插件端口,格式"主机端口:容器内部端口"

View File

@ -17,27 +17,26 @@ export default class plugin {
* @param task.fnc 定时任务方法名
* @param task.log false时不显示执行日志
*/
constructor (data) {
constructor({ name = 'your-plugin', dsc = '无', event = 'message', priority = 5000, task = { fnc: '', cron: '' }, rule = [] }) {
/** 插件名称 */
this.name = data.name
this.name = name
/** 插件描述 */
this.dsc = data.dsc
this.dsc = dsc
/** 监听事件默认message https://oicqjs.github.io/oicq/#events */
this.event = data.event || 'message'
this.event = event
/** 优先级 */
this.priority = data.priority || 5000
this.priority = priority
/** 定时任务,可以是数组 */
this.task = {
/** 任务名 */
name: '',
/** 任务方法名 */
fnc: data.task?.fnc || '',
fnc: task.fnc || '',
/** 任务cron表达式 */
cron: data.task?.cron || ''
cron: task.cron || ''
}
/** 命令规则 */
this.rule = data.rule || []
this.rule = rule
}
/**

View File

@ -4,6 +4,7 @@ import lodash from 'lodash'
import template from 'art-template'
import chokidar from 'chokidar'
import cfg from '../config/config.js'
import common from '../common/common.js'
const _path = process.cwd()
@ -101,7 +102,6 @@ class Puppeteer {
logger.error('puppeteer Chromium 尝试连接已有实例失败')
}
if (!this.browser || !connectFlag) {
// 如果没有实例初始化puppeteer
this.browser = await puppeteer.launch(this.config).catch((err, trace) => {
@ -130,7 +130,7 @@ class Puppeteer {
logger.mark('puppeteer Chromium 已连接启动的实例')
} else {
console.log('chromium', this.browser.wsEndpoint())
if (this.browserMacKey) {
if (process.env.pm_id && this.browserMacKey) {
//缓存一下实例30天
const expireTime = 60 * 60 * 24 * 30
await redis.set(this.browserMacKey, this.browser.wsEndpoint(), { EX: expireTime })
@ -257,7 +257,7 @@ class Puppeteer {
if (!this.browser) return false
const savePath = this.dealTpl(this.model, data)
const savePath = this.dealTpl(name, data)
if (!savePath) return false
const page = await this.browser.newPage()
@ -282,19 +282,19 @@ class Puppeteer {
quality: 90
}
if (i != 1 && i == num) {
if (i !== 1 && i === num) {
await page.setViewport({
width: boundingBox.width,
height: parseInt(boundingBox.height) - pageHeight * (num - 1)
})
}
if (i != 1 && i <= num) {
if (i !== 1 && i <= num) {
await page.evaluate(() => window.scrollBy(0, 7000))
}
let buff
if (num == 1) {
if (num === 1) {
buff = await body.screenshot(randData)
} else {
buff = await page.screenshot(randData)

View File

@ -17,6 +17,7 @@
- 烟绯
- 北斗
- 辛焱
- 白术
诗文:
- 蒙德
- - 温迪
@ -134,6 +135,7 @@
- 匣里日月
- 黑岩战弓
- 千岩古剑
- 碧落之珑
高塔孤王:
- 蒙德
- - 松籁响起之时
@ -155,6 +157,7 @@
- 纳西妲
- 莱依拉
- 艾尔海森
- 卡维
风雅:
- 稻妻
- - 荒泷一斗

View File

@ -70,3 +70,5 @@
纳西妲:
瑶瑶:
艾尔海森:
卡维:
白术:

View File

@ -116,6 +116,7 @@
盈满之实: 法器
流浪的晚星: 法器
图莱杜拉的回忆: 法器
碧落之珑: 法器
猎弓:
历练的猎弓:

View File

@ -1,3 +1,21 @@
- up4:
- 久岐忍
- 多莉
- 莱依拉
up5:
- 纳西妲
up5_2:
- 妮露
weapon5:
- 千夜浮梦
- 圣显之钥
weapon4:
- 西福斯的月光
- 西风大剑
- 匣里灭辰
- 祭礼残章
- 绝弦
endTime: "2023-05-02 18:00:00"
- up4:
- 米卡
- 砂糖

View File

@ -1,3 +1,13 @@
- from: '2023-04-12 06:00:00'
to: '2023-05-02 17:59:59'
five:
- 纳西妲
- 妮露
four:
- 久岐忍
- 多莉
- 莱依拉
name: 月草的赐慧|翩舞歈莲
- from: '2023-03-21 18:00:00'
to: '2023-04-11 14:59:59'
five:
@ -102,7 +112,7 @@
to: '2022-09-27 14:59:59'
five:
- 甘雨
- 心海
- 珊瑚宫心海
four:
- 行秋
- 砂糖

View File

@ -1,3 +1,15 @@
- from: '2023-04-12 06:00:00'
to: '2023-05-02 17:59:59'
five:
- 千夜浮梦
- 圣显之钥
four:
- 西福斯的月光
- 西风大剑
- 匣里灭辰
- 祭礼残章
- 绝弦
name: 神铸赋形
- from: '2023-03-21 18:00:00'
to: '2023-04-11 14:59:59'
five:

View File

@ -758,3 +758,25 @@
- Mika
- mika
- 米咖
- 鹦鹉
- 鹦鹉头
- 玄凤鹦鹉
10000081:
- 卡维
- Kaveh
- kaveh
- 艾尔海森室友
- 室友
- 建筑设计师
- 设计师
- 优秀校友
10000082:
- 白术
- Baizhu
- baizhu
- 长生
- 白术哥哥
- 白先生
- 白大夫
- 白医生
- 白求恩

View File

@ -20,6 +20,8 @@ costumes:
- 霓裾翩跹
- 极夜真梦
- 殷红终夜
- 花时来信
- 叶隐芳名
#五星角色
five:
@ -57,6 +59,7 @@ five:
- 10000075
- 10000078
- 10000079
- 10000082
#四星角色
four:
- 10000006
@ -91,3 +94,4 @@ four:
- 10000076
- 10000077
- 10000080
- 10000081

View File

@ -1,4 +1,4 @@
#命座相关数据源自 https://github.com/CRAZYShimakaze/zhenxun_extensive_plugin/blob/main/genshin_role_info/res/json_data/role_talent.json
#命座相关数据源自 https://github.com/CRAZYShimakaze/zhenxun_extensive_plugin/blob/main/genshin_role_info/res/json_data/roles_talent.json
Name:
'21': 霜杀墨染樱
'22': 三重雪关扉
@ -396,6 +396,18 @@ Name:
'784': 义贯
'785': 智度
'786': 正理
'791': 皎洁之火铓辉灿漫
'792': 净沙利刃明映万乘
'793': 怒势疾迅如焚掠地
'794': 服膺誓禁恪守无失
'795': 猎兽魁首卓荦不羁
'796': 燎燃利爪裂帛斫金
'801': 遇合的因缘
'802': 伴行的旅路
'803': 游击的心得
'804': 晴霜的祝念
'805': 引示的铃箭
'806': 依随的策援
Icon:
'21': UI_Talent_S_Ayaka_01
'22': UI_Talent_S_Ayaka_02
@ -793,3 +805,15 @@ Icon:
'784': UI_Talent_S_Alhatham_03
'785': UI_Talent_U_Alhatham_02
'786': UI_Talent_S_Alhatham_04
'791': UI_Talent_S_Dehya_01
'792': UI_Talent_S_Dehya_02
'793': UI_Talent_U_Dehya_01
'794': UI_Talent_S_Dehya_03
'795': UI_Talent_U_Dehya_02
'796': UI_Talent_S_Dehya_04
'801': UI_Talent_S_Mika_01
'802': UI_Talent_S_Mika_02
'803': UI_Talent_U_Mika_01
'804': UI_Talent_S_Mika_03
'805': UI_Talent_U_Mika_02
'806': UI_Talent_S_Mika_04

View File

@ -1,4 +1,4 @@
#数据源自 https://github.com/CRAZYShimakaze/zhenxun_extensive_plugin/blob/main/genshin_role_info/res/json_data/role_skill.json
#数据源自 https://github.com/CRAZYShimakaze/zhenxun_extensive_plugin/blob/main/genshin_role_info/res/json_data/roles_skill.json
Name:
'10001': 单手剑重攻击
'10002': 长枪重攻击
@ -293,6 +293,7 @@ Name:
'10721': 普通攻击·流耀枪术·守势
'10722': 圣仪·苍鹭庇卫
'10725': 圣仪·灰鸰衒潮
'10731': 普通攻击·行相
'10732': 所闻遍计
'10735': 心景幻成
'10741': 普通攻击·熠辉轨度剑
@ -317,6 +318,14 @@ Name:
'10781': 普通攻击·溯因反绎法
'10782': 共相·理式摹写
'10785': 殊境·显象缚结
'10791': 普通攻击·拂金剑斗术
'10792': 熔铁流狱
'10793': 迪希雅元素战技-二段收刀
'10794': 迪希雅元素爆发_QTE
'10795': 炎啸狮子咬
'10801': 普通攻击·西风枪术·镝传
'10802': 星霜的流旋
'10805': 苍翎的颂愿
'20001': 风魔炮
'20002': 风魔炮
'20011': 飞行挑战 - 前冲
@ -501,6 +510,8 @@ Name:
'5076010': 空中攻击
'5077010': 瑶瑶空中攻击
'5078010': 艾尔海森空中攻击
'5079010': 迪希雅空中攻击
'5080010': 米卡空中攻击
Icon:
'10001': ''
'10002': ''
@ -820,6 +831,14 @@ Icon:
'10781': Skill_A_01
'10782': Skill_S_Alhatham_01
'10785': Skill_E_Alhatham_01
'10791': Skill_A_04
'10792': Skill_S_Dehya_01
'10793': Skill_S_Dehya_02
'10794': Skill_E_Dehya_02
'10795': Skill_E_Dehya_01
'10801': Skill_A_03
'10802': Skill_S_Mika_01
'10805': Skill_E_Mika_01
'20001': Skill_A_Dvalin_AirGun
'20002': Skill_A_Dvalin_AirGun
'20011': Btn_FlightSprint
@ -909,6 +928,7 @@ Icon:
'20340': Btn_BrickBreaker_Launch
'20341': Skill_LanV3_Icon05
'20342': Skill_LanV3_Icon05
'20345': Btn_PacMan
'10384': Btn_Recon_Bait
'100540': Skill_A_01
'100541': Skill_A_01
@ -1004,6 +1024,8 @@ Icon:
'5076010': Skill_A_02
'5077010': Skill_A_03
'5078010': Skill_A_01
'5079010': Skill_A_04
'5080010': Skill_A_03
Talent:
胡桃:
- 1
@ -1203,3 +1225,9 @@ Talent:
瑶瑶:
- 1
- 2
迪希雅:
- 2
- 1
米卡:
- 2
- 1

View File

@ -62,11 +62,13 @@ Name:
'3073454867': 玛海菈的水色
'2359799475': 恶王丸
'902184579': 森林王器
'1200948859': 饰铁之花
'1089950259': 天空之傲
'3995710363': 狼的末路
'1075647299': 松籁响起之时
'2792766467': 无工之剑
'3914951691': 赤角石溃杵
'2834063555': 苇海信标
'2796697027': 新手长枪
'3070169307': 铁尖枪
'1390797107': 白缨枪
@ -226,11 +228,13 @@ Type:
玛海菈的水色: 双手剑
恶王丸: 双手剑
森林王器: 双手剑
饰铁之花: 双手剑
天空之傲: 双手剑
狼的末路: 双手剑
松籁响起之时: 双手剑
无工之剑: 双手剑
赤角石溃杵: 双手剑
苇海信标: 双手剑
新手长枪: 长柄武器
铁尖枪: 长柄武器
白缨枪: 长柄武器
@ -385,11 +389,13 @@ Icon:
玛海菈的水色: UI_EquipIcon_Claymore_Pleroma
恶王丸: UI_EquipIcon_Claymore_Maria
森林王器: UI_EquipIcon_Claymore_Arakalari
饰铁之花: UI_EquipIcon_Claymore_Fleurfair
天空之傲: UI_EquipIcon_Claymore_Dvalin
狼的末路: UI_EquipIcon_Claymore_Wolfmound
松籁响起之时: UI_EquipIcon_Claymore_Widsith
无工之剑: UI_EquipIcon_Claymore_Kunwu
赤角石溃杵: UI_EquipIcon_Claymore_Itadorimaru
苇海信标: UI_EquipIcon_Claymore_Deshret
新手长枪: UI_EquipIcon_Pole_Gewalt
铁尖枪: UI_EquipIcon_Pole_Rod
白缨枪: UI_EquipIcon_Pole_Ruby

View File

@ -52,6 +52,7 @@ sortName:
冰风迷途的勇士: 冰风勇士
沙上楼阁史话: 沙上楼阁
乐园遗落之花: 乐园遗落
花海甘露之光: 花海甘露
actWeapon:

View File

@ -351,7 +351,9 @@ export default class MysNews extends base {
tmp = [`原神${typeName}推送\n`, tmp]
}
redis.set(`${this.key}${groupId}:${postId}`, '1', { EX: 3600 * 10 })
await redis.set(`${this.key}${groupId}:${postId}`, '1', { EX: 3600 * 10 })
// 随机延迟1-180秒
await common.sleep(lodash.random(1, 180) * 1000)
await this.e.group.sendMsg(tmp)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 534 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 77 KiB

View File

@ -52,8 +52,11 @@ export class setPubCk extends plugin {
let ck = msg.replace(/#|'|"/g, '')
let param = {}
ck.split(';').forEach((v) => {
let tmp = lodash.trim(v).split('=')
param[tmp[0]] = tmp[1]
// cookie_token_v2,ltoken_v2值也可能有=
// let tmp = lodash.trim(v).split('=')
let tmp = lodash.trim(v);
let index = tmp.indexOf("=");
param[tmp.slice(0,index)] = tmp.slice(index+1);
})
this.ck = ''