chore: run eslint --fix in onebot module

This commit is contained in:
Wesley F. Young committed 2024-08-09 20:35:03 +08:00
1 parent f5b6fa31a7
commit af01a073ef
110 files changed
+3830 -3827

No files matched your search

+15 -15
View File
@@ -4,25 +4,25 @@ import { ActionName } from '../types';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
const SchemaData = {
type: 'object',
properties: {
group_id: { type: [ 'number' , 'string' ] },
pages: { type: 'number' },
},
required: ['group_id', 'pages']
type: 'object',
properties: {
group_id: { type: [ 'number' , 'string' ] },
pages: { type: 'number' },
},
required: ['group_id', 'pages']
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
export class GetGroupEssence extends BaseAction<Payload, GroupEssenceMsgRet> {
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload) {
const NTQQWebApi = this.CoreContext.getApiContext().WebApi;
const ret = await NTQQWebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
if (!ret) {
throw new Error('获取失败');
actionName = ActionName.GoCQHTTP_GetEssenceMsg;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload) {
const NTQQWebApi = this.CoreContext.getApiContext().WebApi;
const ret = await NTQQWebApi.getGroupEssenceMsg(payload.group_id.toString(), payload.pages.toString());
if (!ret) {
throw new Error('获取失败');
}
return ret;
}
return ret;
}
}