mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-13 00:10:27 +00:00
fix: method signature of _handle
This commit is contained in:
@@ -17,7 +17,7 @@ export class DelGroupFile extends BaseAction<Payload, any> {
|
||||
actionName = ActionName.DelGroupFile;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
async _handle(payload: Payload) {
|
||||
const NTQQGroupApi = this.CoreContext.getApiContext().GroupApi;
|
||||
return await NTQQGroupApi.DelGroupFile(payload.group_id.toString(), [payload.file_id]);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class DelGroupFileFolder extends BaseAction<Payload, any> {
|
||||
actionName = ActionName.DelGroupFileFolder;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
async _handle(payload: Payload) {
|
||||
const NTQQGroupApi = this.CoreContext.getApiContext().GroupApi;
|
||||
return (await NTQQGroupApi.DelGroupFileFolder(payload.group_id.toString(), payload.folder_id)).groupFileCommonResult;
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ export class GetFileBase extends BaseAction<GetFilePayload, GetFileResponse> {
|
||||
return { id: element.elementId, element: element.fileElement };
|
||||
}
|
||||
|
||||
protected async _handle(payload: GetFilePayload): Promise<GetFileResponse> {
|
||||
async _handle(payload: GetFilePayload): Promise<GetFileResponse> {
|
||||
const NTQQFriendApi = this.CoreContext.getApiContext().FriendApi;
|
||||
const NTQQUserApi = this.CoreContext.getApiContext().UserApi;
|
||||
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
|
||||
@@ -225,7 +225,7 @@ export default class GetFile extends GetFileBase {
|
||||
actionName = ActionName.GetFile;
|
||||
PayloadSchema = GetFile_PayloadSchema;
|
||||
|
||||
protected async _handle(payload: GetFile_Payload): Promise<GetFileResponse> {
|
||||
async _handle(payload: GetFile_Payload): Promise<GetFileResponse> {
|
||||
payload.file = payload.file_id;
|
||||
return super._handle(payload);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export class GetGroupFileCount extends BaseAction<Payload, { count: number }> {
|
||||
actionName = ActionName.GetGroupFileCount;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
async _handle(payload: Payload) {
|
||||
const NTQQGroupApi = this.CoreContext.getApiContext().GroupApi;
|
||||
const ret = await NTQQGroupApi.GetGroupFileCount([payload.group_id?.toString()]);
|
||||
return { count: ret.groupFileCounts[0] };
|
||||
|
||||
@@ -18,7 +18,7 @@ export class GetGroupFileList extends BaseAction<Payload, { FileList: Array<any>
|
||||
actionName = ActionName.GetGroupFileList;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
async _handle(payload: Payload) {
|
||||
const NTQQMsgApi = this.CoreContext.getApiContext().MsgApi;
|
||||
const ret = await NTQQMsgApi.getGroupFileList(payload.group_id.toString(), {
|
||||
sortType: 1,
|
||||
|
||||
@@ -8,7 +8,7 @@ interface Payload extends GetFilePayload {
|
||||
export default class GetRecord extends GetFileBase {
|
||||
actionName = ActionName.GetRecord;
|
||||
|
||||
protected async _handle(payload: Payload): Promise<GetFileResponse> {
|
||||
async _handle(payload: Payload): Promise<GetFileResponse> {
|
||||
const res = super._handle(payload);
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ export class SetGroupFileFolder extends BaseAction<Payload, any> {
|
||||
actionName = ActionName.SetGroupFileFolder;
|
||||
PayloadSchema = SchemaData;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
async _handle(payload: Payload) {
|
||||
const NTQQGroupApi = this.CoreContext.getApiContext().GroupApi;
|
||||
return (await NTQQGroupApi.CreatGroupFileFolder(payload.group_id.toString(), payload.folder_name)).resultWithGroupItem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user