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:
DrSmoothl committed 2026-08-17 19:22:59 +08:00
1 parent 25a40f4ab6
commit b63c3c370b
3 files changed
+12 -5

No files matched your search

+5 -2
View File
@@ -1029,6 +1029,7 @@
{
"name": "del_group_album_media",
"aliases": [],
"summary": "删除群相册图片或视频",
"readOnly": false,
"params": [
{
@@ -1058,7 +1059,8 @@
"schema": {
"type": "string",
"minLength": 1
}
},
"desc": "图片长定位标识,或视频 id"
}
],
"invariants": [],
@@ -1077,7 +1079,8 @@
},
"lloc": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "图片长定位标识,或视频 id"
}
},
"required": [
+5 -2
View File
@@ -1032,6 +1032,7 @@ export const ACTIONS: CatalogAction[] = [
{
"name": "del_group_album_media",
"aliases": [],
"summary": "删除群相册图片或视频",
"readOnly": false,
"params": [
{
@@ -1061,7 +1062,8 @@ export const ACTIONS: CatalogAction[] = [
"schema": {
"type": "string",
"minLength": 1
}
},
"desc": "图片长定位标识,或视频 id"
}
],
"invariants": [],
@@ -1080,7 +1082,8 @@ export const ACTIONS: CatalogAction[] = [
},
"lloc": {
"type": "string",
"minLength": 1
"minLength": 1,
"description": "图片长定位标识,或视频 id"
}
},
"required": [
+2 -1
View File
@@ -223,9 +223,10 @@ export const actions = [
groupAction({
name: 'del_group_album_media',
summary: '删除群相册图片或视频',
params: {
album_id: f.string({ allowEmpty: false }),
lloc: f.string({ allowEmpty: false }),
lloc: f.string({ allowEmpty: false }).describe('图片长定位标识,或视频 id'),
},
run: async (p, ctx) => {
const res = await ctx.bridge.apis.groupAlbum.delete(p.group_id, p.album_id, p.lloc);