mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: #544
This commit is contained in:
parent
3a6748ae37
commit
648faedca6
@ -107,7 +107,7 @@ export class NTQQFileApi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: 0 | 1 = 0,): Promise<SendPicElement> {
|
async createValidSendPicElement(context: MessageContext, picPath: string, summary: string = '', subType: 0 | 1 = 0): Promise<SendPicElement> {
|
||||||
const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(picPath, ElementType.PIC, subType);
|
const { md5, fileName, path, fileSize } = await this.core.apis.FileApi.uploadFile(picPath, ElementType.PIC, subType);
|
||||||
if (fileSize === 0) {
|
if (fileSize === 0) {
|
||||||
throw new Error('文件异常,大小为0');
|
throw new Error('文件异常,大小为0');
|
||||||
|
@ -149,6 +149,9 @@ export function mergeOneBotConfigs(
|
|||||||
if (userConfig.musicSignUrl !== undefined) {
|
if (userConfig.musicSignUrl !== undefined) {
|
||||||
mergedConfig.musicSignUrl = userConfig.musicSignUrl;
|
mergedConfig.musicSignUrl = userConfig.musicSignUrl;
|
||||||
}
|
}
|
||||||
|
if(userConfig.enableLocalFile2Url !== undefined) {
|
||||||
|
mergedConfig.enableLocalFile2Url = userConfig.enableLocalFile2Url;
|
||||||
|
}
|
||||||
return mergedConfig;
|
return mergedConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user