style: 强类型大法
This commit is contained in:
1 parent
76501bae34
commit
70945cf2d8
191 files changed
+923
-806
No files matched your search
@@ -1,7 +1,5 @@
|
||||
import { ActionName } from '@/onebot/action/router';
|
||||
import { GetPacketStatusDepends } from '@/onebot/action/packet/GetPacketStatus';
|
||||
import { uriToLocalFile } from '@/common/file';
|
||||
import { ChatType, Peer } from '@/core';
|
||||
import { AIVoiceChatType } from '@/core/packet/entities/aiChat';
|
||||
import { Static, Type } from '@sinclair/typebox';
|
||||
|
||||
@@ -17,8 +15,8 @@ type Payload = Static<typeof SchemaData>;
|
||||
export class SendGroupAiRecord extends GetPacketStatusDepends<Payload, {
|
||||
message_id: number
|
||||
}> {
|
||||
actionName = ActionName.SendGroupAiRecord;
|
||||
payloadSchema = SchemaData;
|
||||
override actionName = ActionName.SendGroupAiRecord;
|
||||
override payloadSchema = SchemaData;
|
||||
|
||||
async _handle(payload: Payload) {
|
||||
await this.core.apis.PacketApi.pkt.operation.GetAiVoice(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
|
||||
|
||||
Reference in new issue
Block a user