mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 16:20:25 +00:00
Add action metadata to OneBot action classes
Added or updated actionSummary, actionTags, payloadExample, and returnExample properties for all OneBot action classes in the napcat-onebot package. This improves API documentation and discoverability by providing concise summaries, categorization tags, and usage examples for each action.
This commit is contained in:
@@ -15,6 +15,13 @@ export class SendOnlineFolder extends OneBotAction<SendOnlineFolderPayload, any>
|
||||
override actionName = ActionName.SendOnlineFolder;
|
||||
override payloadSchema = SendOnlineFolderPayloadSchema;
|
||||
override returnSchema = Type.Any({ description: '发送结果' });
|
||||
override actionSummary = '发送在线文件夹';
|
||||
override actionTags = ['文件扩展'];
|
||||
override payloadExample = {
|
||||
user_id: '123456789',
|
||||
folder_path: 'C:\\path\\to\\folder'
|
||||
};
|
||||
override returnExample = null;
|
||||
|
||||
async _handle (payload: SendOnlineFolderPayload) {
|
||||
const uid = await this.core.apis.UserApi.getUidByUinV2(payload.user_id.toString());
|
||||
|
||||
Reference in New Issue
Block a user