diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 52a365574..3d457720a 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 cded41438..c95150d25 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