mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-06 13:05:09 +00:00
chore: run a full eslint
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user