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 }