chore: run eslint --fix in onebot module

This commit is contained in:
Wesley F. Young
2024-08-09 20:35:03 +08:00
parent 714f8327ea
commit 5990e0c2eb
110 changed files with 3832 additions and 3829 deletions

View File

@@ -4,24 +4,24 @@ import { ActionName } from '../types';
import { NTQQFriendApi } from '@/core/apis/friend';
const SchemaData = {
type: 'object',
properties: {
flag: { type: 'string' },
approve: { type: ['string', 'boolean'] },
remark: { type: 'string' }
},
required: ['flag']
type: 'object',
properties: {
flag: { type: 'string' },
approve: { type: ['string', 'boolean'] },
remark: { type: 'string' }
},
required: ['flag']
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
export default class SetFriendAddRequest extends BaseAction<Payload, null> {
actionName = ActionName.SetFriendAddRequest;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload): Promise<null> {
const NTQQFriendApi = this.CoreContext.getApiContext().FriendApi;
const approve = payload.approve?.toString() !== 'false';
await NTQQFriendApi.handleFriendRequest(payload.flag, approve);
return null;
}
actionName = ActionName.SetFriendAddRequest;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload): Promise<null> {
const NTQQFriendApi = this.CoreContext.getApiContext().FriendApi;
const approve = payload.approve?.toString() !== 'false';
await NTQQFriendApi.handleFriendRequest(payload.flag, approve);
return null;
}
}