feat(onebot): delete group album videos by video id
del_group_album_media accepts a photo id or a video id in lloc. Fixes #384
This commit is contained in:
3 files changed
+12
-5
No files matched your search
@@ -1029,6 +1029,7 @@
|
|||||||
{
|
{
|
||||||
"name": "del_group_album_media",
|
"name": "del_group_album_media",
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
"summary": "删除群相册图片或视频",
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -1058,7 +1059,8 @@
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 1
|
"minLength": 1
|
||||||
}
|
},
|
||||||
|
"desc": "图片长定位标识,或视频 id"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"invariants": [],
|
"invariants": [],
|
||||||
@@ -1077,7 +1079,8 @@
|
|||||||
},
|
},
|
||||||
"lloc": {
|
"lloc": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 1
|
"minLength": 1,
|
||||||
|
"description": "图片长定位标识,或视频 id"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -1032,6 +1032,7 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
{
|
{
|
||||||
"name": "del_group_album_media",
|
"name": "del_group_album_media",
|
||||||
"aliases": [],
|
"aliases": [],
|
||||||
|
"summary": "删除群相册图片或视频",
|
||||||
"readOnly": false,
|
"readOnly": false,
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
@@ -1061,7 +1062,8 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
"schema": {
|
"schema": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 1
|
"minLength": 1
|
||||||
}
|
},
|
||||||
|
"desc": "图片长定位标识,或视频 id"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"invariants": [],
|
"invariants": [],
|
||||||
@@ -1080,7 +1082,8 @@ export const ACTIONS: CatalogAction[] = [
|
|||||||
},
|
},
|
||||||
"lloc": {
|
"lloc": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"minLength": 1
|
"minLength": 1,
|
||||||
|
"description": "图片长定位标识,或视频 id"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"required": [
|
"required": [
|
||||||
|
|||||||
@@ -223,9 +223,10 @@ export const actions = [
|
|||||||
|
|
||||||
groupAction({
|
groupAction({
|
||||||
name: 'del_group_album_media',
|
name: 'del_group_album_media',
|
||||||
|
summary: '删除群相册图片或视频',
|
||||||
params: {
|
params: {
|
||||||
album_id: f.string({ allowEmpty: false }),
|
album_id: f.string({ allowEmpty: false }),
|
||||||
lloc: f.string({ allowEmpty: false }),
|
lloc: f.string({ allowEmpty: false }).describe('图片长定位标识,或视频 id'),
|
||||||
},
|
},
|
||||||
run: async (p, ctx) => {
|
run: async (p, ctx) => {
|
||||||
const res = await ctx.bridge.apis.groupAlbum.delete(p.group_id, p.album_id, p.lloc);
|
const res = await ctx.bridge.apis.groupAlbum.delete(p.group_id, p.album_id, p.lloc);
|
||||||
|
|||||||
Reference in new issue
Block a user