修正一处pr错误
This commit is contained in:
parent
4cd5558f8d
commit
44a01bf838
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue