chore: run a full eslint

This commit is contained in:
Wesley F. Young
2024-08-10 19:58:31 +08:00
parent 9a9511aad6
commit 116a04e081
198 changed files with 8187 additions and 7744 deletions

View File

@@ -1,13 +1,14 @@
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
const SchemaData = {
type: 'object',
properties: {
group_id: { type: [ 'number' , 'string' ] },
enable: { type: ['boolean','string'] }
group_id: { type: ['number', 'string'] },
enable: { type: ['boolean', 'string'] },
},
required: ['group_id']
required: ['group_id'],
} as const satisfies JSONSchema;
type Payload = FromSchema<typeof SchemaData>;
@@ -15,6 +16,7 @@ type Payload = FromSchema<typeof SchemaData>;
export default class SetGroupWholeBan extends BaseAction<Payload, null> {
actionName = ActionName.SetGroupWholeBan;
PayloadSchema = SchemaData;
protected async _handle(payload: Payload): Promise<null> {
const enable = payload.enable?.toString() !== 'false';
const NTQQGroupApi = this.CoreContext.getApiContext().GroupApi;