feat(onebot): add upload_video_to_qun_album
Group albums already list videos, but upload only accepted images. Add a dedicated video action that extracts a cover and returns the new video id. Fixed #331
This commit is contained in:
6 files changed
+769
-6
No files matched your search
@@ -155,6 +155,28 @@ export const actions = [
|
||||
},
|
||||
}),
|
||||
|
||||
groupAction({
|
||||
name: 'upload_video_to_qun_album',
|
||||
summary: '上传视频到群相册',
|
||||
returns: '{ id: string }',
|
||||
returnsSchema: {
|
||||
type: 'object',
|
||||
properties: {
|
||||
id: { type: 'string', description: '视频 id' },
|
||||
},
|
||||
required: ['id'],
|
||||
},
|
||||
params: {
|
||||
album_id: f.string({ allowEmpty: false }).describe('相册 id'),
|
||||
album_name: f.string({ allowEmpty: false }).describe('相册名称'),
|
||||
file: f.video().describe('视频文件'),
|
||||
},
|
||||
run: async (p, ctx) => {
|
||||
const result = await ctx.bridge.apis.groupAlbum.uploadVideo(p.group_id, p.album_id, p.album_name, p.file);
|
||||
return okResponse(result);
|
||||
},
|
||||
}),
|
||||
|
||||
groupAction({
|
||||
name: 'get_group_album_media_list',
|
||||
readOnly: true,
|
||||
|
||||
Reference in new issue
Block a user