mirror of
https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git
synced 2024-12-22 11:00:51 +08:00
修复 合并转发
This commit is contained in:
parent
33719e5bba
commit
d0bce5f68d
@ -255,11 +255,11 @@ export async function Note_appoint(e) {
|
||||
let imgurl;
|
||||
let pathFile = urlType[item].replace(/\./, _path)
|
||||
if (item.includes(".")) {
|
||||
imgurl = await segment.image(`file:///${pathFile}`);
|
||||
imgurl = await segment.image(`file://${pathFile}`);
|
||||
item = item.split(".")[0];
|
||||
} else {
|
||||
imgurl = await segment.image(
|
||||
`file:///${pathFile}/icon/bg/${fs.readdirSync(`${pathFile}/icon/bg/`)[0]}`
|
||||
`file://${pathFile}/icon/bg/${fs.readdirSync(`${pathFile}/icon/bg/`)[0]}`
|
||||
)
|
||||
}
|
||||
if (isUser && !temp?.includes(item)) {
|
||||
|
@ -92,12 +92,12 @@ export async function bindSkCK(e, res) {
|
||||
await bindStoken(e)
|
||||
e.ck = res?.cookie, e.msg = res.cookie, e.raw_message = res.cookie;
|
||||
if (isV3) {
|
||||
let userck = (await import(`file:///${_path}/plugins/genshin/model/user.js`)).default
|
||||
let userck = (await import(`file://${_path}/plugins/genshin/model/user.js`)).default
|
||||
await (new userck(e)).bing()
|
||||
} else {
|
||||
let {
|
||||
bingCookie
|
||||
} = (await import(`file:///${_path}/lib/app/dailyNote.js`))
|
||||
} = (await import(`file://${_path}/lib/app/dailyNote.js`))
|
||||
await bingCookie(e)
|
||||
}
|
||||
}
|
||||
|
10
apps/user.js
10
apps/user.js
@ -119,7 +119,7 @@ export async function gcPaylog(e) {
|
||||
EX: time
|
||||
});
|
||||
if (isV3) {
|
||||
let { payLog } = (await import(`file:///${_path}/plugins/genshin/apps/payLog.js`))
|
||||
let { payLog } = (await import(`file://${_path}/plugins/genshin/apps/payLog.js`))
|
||||
let pl = (new payLog())
|
||||
e.isGroup = false;
|
||||
pl.e = e
|
||||
@ -166,12 +166,12 @@ export async function gclog(e) {
|
||||
sendMsg = [...sendMsg, ...[1, `uid:${e.uid}`, e.msg]]
|
||||
} else {
|
||||
if (isV3) {
|
||||
let gclog = (await import(`file:///${_path}/plugins/genshin/model/gachaLog.js`)).default
|
||||
let gclog = (await import(`file://${_path}/plugins/genshin/model/gachaLog.js`)).default
|
||||
await (new gclog(e)).logUrl()
|
||||
} else {
|
||||
let {
|
||||
bing
|
||||
} = (await import(`file:///${_path}/lib/app/gachaLog.js`))
|
||||
} = (await import(`file://${_path}/lib/app/gachaLog.js`))
|
||||
e.isPrivate = true;
|
||||
await bing(e)
|
||||
}
|
||||
@ -352,13 +352,13 @@ export async function updCookie(e) {
|
||||
sendMsg = [...sendMsg, ...[`uid:${stoken[item].uid}`, e.msg]]
|
||||
} else {
|
||||
if (isV3) {
|
||||
let userck = (await import(`file:///${_path}/plugins/genshin/model/user.js`)).default
|
||||
let userck = (await import(`file://${_path}/plugins/genshin/model/user.js`)).default
|
||||
e.ck = e.msg;
|
||||
await (new userck(e)).bing()
|
||||
} else {
|
||||
let {
|
||||
bingCookie
|
||||
} = (await import(`file:///${_path}/lib/app/dailyNote.js`))
|
||||
} = (await import(`file://${_path}/lib/app/dailyNote.js`))
|
||||
e.isPrivate = true;
|
||||
await bingCookie(e)
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ export async function getBasicVoide(e) {
|
||||
if (source) {
|
||||
let imgPath = await redis.get(`xiaoyao:basic:${source.message_id}`)
|
||||
if (imgPath) {
|
||||
e.reply([segment.video(`file:///${imgPath}`)])
|
||||
e.reply([segment.video(`file://${imgPath}`)])
|
||||
return true
|
||||
}
|
||||
if (source.time) {
|
||||
@ -129,7 +129,7 @@ const filePath = async function (e) {
|
||||
}
|
||||
let path = `${pathPlus}${val}/${msg}.png`
|
||||
if (fs.existsSync(path)) {
|
||||
e.reply(segment.image(`file:///${path}`));
|
||||
e.reply(segment.image(`file://${path}`));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -154,9 +154,9 @@ const send_Msg = async function (e, type, name) {
|
||||
if (!fs.existsSync(path)) {
|
||||
return false;
|
||||
}
|
||||
let msg = segment.image(`file:///${path}`)
|
||||
let msg = segment.image(`file://${path}`)
|
||||
try {
|
||||
if (/动态|幻影/.test(e.msg)) msg = segment.video(`file:///${path.replace(/\.png|\.jpg/, '.mp4')}`)
|
||||
if (/动态|幻影/.test(e.msg)) msg = segment.video(`file://${path.replace(/\.png|\.jpg/, '.mp4')}`)
|
||||
} catch (error) {
|
||||
Bot.logger.error(`发送七圣动态数据失败:` + error)
|
||||
// error
|
||||
|
@ -70,10 +70,15 @@ export async function replyMake(e, _msg, lenght) {
|
||||
user_id: Bot.uin
|
||||
})
|
||||
}
|
||||
if (e._reply) {
|
||||
e._reply(await Bot.makeForwardMsg(msgList));
|
||||
if (e.isGroup) {
|
||||
msgList = await e.group.makeForwardMsg(msgList)
|
||||
} else {
|
||||
e.reply(await Bot.makeForwardMsg(msgList));
|
||||
msgList = await e.friend.makeForwardMsg(msgList)
|
||||
}
|
||||
if (e._reply) {
|
||||
e._reply(msgList);
|
||||
} else {
|
||||
e.reply(msgList);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user