mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
Merge pull request #308 from LingLambda/main
规范了_send_group_notice接口参数命名,适当的规范了部分变量命名
This commit is contained in:
commit
2a2d5382e1
@ -11,7 +11,7 @@ const SchemaData = {
|
|||||||
content: { type: 'string' },
|
content: { type: 'string' },
|
||||||
image: { type: 'string' },
|
image: { type: 'string' },
|
||||||
pinned: { type: ['number', 'string'] },
|
pinned: { type: ['number', 'string'] },
|
||||||
confirmRequired: { type: ['number', 'string'] },
|
confirm_required: { type: ['number', 'string'] },
|
||||||
},
|
},
|
||||||
required: ['group_id', 'content'],
|
required: ['group_id', 'content'],
|
||||||
} as const satisfies JSONSchema;
|
} as const satisfies JSONSchema;
|
||||||
@ -49,12 +49,12 @@ export class SendGroupNotice extends BaseAction<Payload, null> {
|
|||||||
}
|
}
|
||||||
UploadImage = ImageUploadResult.picInfo;
|
UploadImage = ImageUploadResult.picInfo;
|
||||||
}
|
}
|
||||||
let Notice_Pinned = +(payload.pinned ?? 0);
|
let noticePinned = +(payload.pinned ?? 0);
|
||||||
let Notice_confirmRequired = +(payload.confirmRequired ?? 0);
|
let noticeConfirmRequired = +(payload.confirm_required ?? 0);
|
||||||
const PublishGroupBulletinResult = await NTQQGroupApi.publishGroupBulletin(payload.group_id.toString(), payload.content, UploadImage, Notice_Pinned, Notice_confirmRequired);
|
const publishGroupBulletinResult = await NTQQGroupApi.publishGroupBulletin(payload.group_id.toString(), payload.content, UploadImage, noticePinned, noticeConfirmRequired);
|
||||||
|
|
||||||
if (PublishGroupBulletinResult.result != 0) {
|
if (publishGroupBulletinResult.result != 0) {
|
||||||
throw `设置群公告失败,错误信息:${PublishGroupBulletinResult.errMsg}`;
|
throw `设置群公告失败,错误信息:${publishGroupBulletinResult.errMsg}`;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user