mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-12 07:50:25 +00:00
refactor: 优化eslint配置,提升代码质量 (#1341)
* feat: 统一并标准化eslint * lint: napcat.webui * lint: napcat.webui * lint: napcat.core * build: fix * lint: napcat.webui * refactor: 重构eslint * Update README.md
This commit is contained in:
@@ -3,29 +3,29 @@ import { ActionName } from '@/onebot/action/router';
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
|
||||
const SchemaData = Type.Object({
|
||||
model: Type.Optional(Type.String()),
|
||||
model: Type.Optional(Type.String()),
|
||||
});
|
||||
|
||||
type Payload = Static<typeof SchemaData>;
|
||||
|
||||
export class GoCQHTTPGetModelShow extends OneBotAction<Payload, Array<{
|
||||
variants: {
|
||||
model_show: string;
|
||||
need_pay: boolean;
|
||||
}
|
||||
variants: {
|
||||
model_show: string;
|
||||
need_pay: boolean;
|
||||
}
|
||||
}>> {
|
||||
override actionName = ActionName.GoCQHTTP_GetModelShow;
|
||||
override payloadSchema = SchemaData;
|
||||
override actionName = ActionName.GoCQHTTP_GetModelShow;
|
||||
override payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
if (!payload.model) {
|
||||
payload.model = 'napcat';
|
||||
}
|
||||
return [{
|
||||
variants: {
|
||||
model_show: 'napcat',
|
||||
need_pay: false
|
||||
}
|
||||
}];
|
||||
async _handle (payload: Payload) {
|
||||
if (!payload.model) {
|
||||
payload.model = 'napcat';
|
||||
}
|
||||
return [{
|
||||
variants: {
|
||||
model_show: 'napcat',
|
||||
need_pay: false,
|
||||
},
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user