From 44a01bf83824dca9972acd07f8cff4b0e2ac7798 Mon Sep 17 00:00:00 2001 From: Kokomi <102026640+yoimiya-kokomi@users.noreply.github.com> Date: Wed, 7 Jun 2023 05:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E5=A4=84pr=E9=94=99?= =?UTF-8?q?=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common/common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/common/common.js b/lib/common/common.js index 93e95b3..84a8a17 100644 --- a/lib/common/common.js +++ b/lib/common/common.js @@ -34,11 +34,11 @@ function sleep (ms) { * @param fileUrl 下载地址 * @param savePath 保存路径 */ -async function downFile (fileUrl, savePath,param = {}) { +async function downFile (fileUrl, savePath, param = {}) { try { mkdirs(path.dirname(savePath)) logger.debug(`[下载文件] ${fileUrl}`) - const response = await fetch(fileUrl,param) + const response = await fetch(fileUrl, param) const streamPipeline = promisify(pipeline) await streamPipeline(response.body, fs.createWriteStream(savePath)) return true @@ -68,7 +68,7 @@ function mkdirs (dirname) { */ async function makeForwardMsg (e, msg = [], dec = '', msgsscr = false) { // 是频道直接返回 join - if (e.isGuild) return msg.join("\n") + if (e.isGuild) return msg.join('\n') let name = msgsscr ? this.e.sender.card || this.e.user_id : Bot.nickname let id = msgsscr ? this.e.user_id : Bot.uin @@ -77,7 +77,7 @@ async function makeForwardMsg (e, msg = [], dec = '', msgsscr = false) { } let userInfo = { - user_id: id + user_id: id, nickname: name }