🐞 fix: 修复解析后发送语音错误

This commit is contained in:
DESKTOP-I4SRUE6\NikoYoke 2024-11-08 20:57:35 +08:00
parent 46a1c87f6f
commit b1f93c6be1
2 changed files with 156 additions and 156 deletions

View File

@ -362,12 +362,12 @@ export class songRequest extends plugin {
}
// 发送群文件
await this.uploadGroupFile(e, path);
// 删除文件
await checkAndRemoveFile(path);
// 发送语音
if (musicExt != 'mp4' && this.isSendVocal) {
await e.reply(segment.record(path));
}
// 删除文件
await checkAndRemoveFile(path);
}
}).catch(err => {
logger.error(`下载音乐失败,错误信息为: ${err}`);

View File

@ -1841,12 +1841,12 @@ export class tools extends plugin {
downloadAudio(url, this.getCurDownloadPath(e), title, 'follow', musicExt).then(async path => {
// 发送群文件
await this.uploadGroupFile(e, path);
// 删除文件
await checkAndRemoveFile(path);
// 发送语音
if (musicExt != 'mp4' && this.isSendVocal) {
await e.reply(segment.record(path));
}
// 删除文件
await checkAndRemoveFile(path);
}).catch(err => {
logger.error(`下载音乐失败,错误信息为: ${err}`);
});