From d0bce5f68d52d1152f6c77a1c90fd4df72202d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=F0=9F=8C=8C?= Date: Fri, 14 Apr 2023 21:28:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E5=90=88=E5=B9=B6?= =?UTF-8?q?=E8=BD=AC=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/Note.js | 4 ++-- apps/mhyTopUpLogin.js | 4 ++-- apps/user.js | 10 +++++----- apps/xiaoyao_image.js | 8 ++++---- model/mys/utils.js | 11 ++++++++--- 5 files changed, 21 insertions(+), 16 deletions(-) diff --git a/apps/Note.js b/apps/Note.js index 316974c..56af60d 100644 --- a/apps/Note.js +++ b/apps/Note.js @@ -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)) { diff --git a/apps/mhyTopUpLogin.js b/apps/mhyTopUpLogin.js index a12e859..e938683 100644 --- a/apps/mhyTopUpLogin.js +++ b/apps/mhyTopUpLogin.js @@ -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) } } diff --git a/apps/user.js b/apps/user.js index db6d769..11b7d9b 100644 --- a/apps/user.js +++ b/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) } diff --git a/apps/xiaoyao_image.js b/apps/xiaoyao_image.js index c859b0b..81683d0 100644 --- a/apps/xiaoyao_image.js +++ b/apps/xiaoyao_image.js @@ -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 diff --git a/model/mys/utils.js b/model/mys/utils.js index 99647c4..e6497c5 100644 --- a/model/mys/utils.js +++ b/model/mys/utils.js @@ -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); } }