feat(onebot): backfill returnsSchema on info/group-info read-only actions

This commit is contained in:
DrSmoothl committed 2026-06-26 22:44:10 +08:00
1 parent 0163af979a
commit d2490787ae
2 files changed
+47

No files matched your search

+12
View File
@@ -70,6 +70,12 @@ export const actions = [
defineAction({
name: 'can_send_image',
readOnly: true,
returns: '能力查询结果。',
returnsSchema: {
type: 'object',
properties: { yes: { type: 'boolean', description: '是否支持发送图片' } },
required: ['yes'],
},
params: {},
run: (_p, ctx) => {
return okResponse({ yes: ctx.canSendImage?.() ?? false });
@@ -79,6 +85,12 @@ export const actions = [
defineAction({
name: 'can_send_record',
readOnly: true,
returns: '能力查询结果。',
returnsSchema: {
type: 'object',
properties: { yes: { type: 'boolean', description: '是否支持发送语音' } },
required: ['yes'],
},
params: {},
run: (_p, ctx) => {
return okResponse({ yes: ctx.canSendRecord?.() ?? false });