style: 强类型大法
This commit is contained in:
1 parent
76501bae34
commit
70945cf2d8
191 files changed
+923
-806
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { ShutUpGroupMember } from '@/core';
|
||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
@@ -8,9 +9,9 @@ const SchemaData = Type.Object({
|
||||
|
||||
type Payload = Static<typeof SchemaData>;
|
||||
|
||||
export class GetGroupShutList extends OneBotAction<Payload, any> {
|
||||
actionName = ActionName.GetGroupShutList;
|
||||
payloadSchema = SchemaData;
|
||||
export class GetGroupShutList extends OneBotAction<Payload, ShutUpGroupMember[]> {
|
||||
override actionName = ActionName.GetGroupShutList;
|
||||
override payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
return await this.core.apis.GroupApi.getGroupShutUpMemberList(payload.group_id.toString());
|
||||
|
||||
Reference in new issue
Block a user