diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 52a36557..3d457720 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -201,7 +201,7 @@ export class NTQQFileApi { elementType: ElementType.VIDEO, elementId: '', videoElement: { - fileName: fileName || _fileName, + fileName: (fileName || _fileName).replace(/\.[^/.]+$/, '.mp4'), filePath: path, videoMd5: md5, thumbMd5, diff --git a/src/onebot/action/go-cqhttp/DownloadFile.ts b/src/onebot/action/go-cqhttp/DownloadFile.ts index cded4143..c95150d2 100644 --- a/src/onebot/action/go-cqhttp/DownloadFile.ts +++ b/src/onebot/action/go-cqhttp/DownloadFile.ts @@ -73,7 +73,7 @@ export default class GoCQHTTPDownloadFile extends BaseAction