mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix #398
This commit is contained in:
parent
10e281ed35
commit
7affa081ac
@ -59,7 +59,9 @@ export class NTQQGroupApi {
|
|||||||
pageLimit: 300,
|
pageLimit: 300,
|
||||||
}, pskey);
|
}, pskey);
|
||||||
}
|
}
|
||||||
|
async getGroupShutUpMemberList(groupCode: string) {
|
||||||
|
return this.context.session.getGroupService().getGroupShutUpMemberList(groupCode);
|
||||||
|
}
|
||||||
async clearGroupNotifiesUnreadCount(uk: boolean) {
|
async clearGroupNotifiesUnreadCount(uk: boolean) {
|
||||||
return this.context.session.getGroupService().clearGroupNotifiesUnreadCount(uk);
|
return this.context.session.getGroupService().clearGroupNotifiesUnreadCount(uk);
|
||||||
}
|
}
|
||||||
|
@ -145,7 +145,7 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req
|
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req
|
||||||
|
|
||||||
getGroupAllInfo(): unknown;
|
getGroupAllInfo(groupId: string, sourceId: number): Promise<any>;
|
||||||
|
|
||||||
getDiscussExistInfo(): unknown;
|
getDiscussExistInfo(): unknown;
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
setGroupShutUp(groupCode: string, shutUp: boolean): void;
|
setGroupShutUp(groupCode: string, shutUp: boolean): void;
|
||||||
|
|
||||||
getGroupShutUpMemberList(groupCode: string): unknown[];
|
getGroupShutUpMemberList(groupCode: string): Promise<any>;
|
||||||
|
|
||||||
setMemberShutUp(groupCode: string, memberTimes: { uid: string, timeStamp: number }[]): Promise<void>;
|
setMemberShutUp(groupCode: string, memberTimes: { uid: string, timeStamp: number }[]): Promise<void>;
|
||||||
|
|
||||||
|
24
src/onebot/action/group/GetGroupShutList.ts
Normal file
24
src/onebot/action/group/GetGroupShutList.ts
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
import { OB11Group } from '@/onebot';
|
||||||
|
import BaseAction from '../BaseAction';
|
||||||
|
import { ActionName } from '../types';
|
||||||
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
|
|
||||||
|
const SchemaData = {
|
||||||
|
type: 'object',
|
||||||
|
properties: {
|
||||||
|
group_id: { type: ['number', 'string'] },
|
||||||
|
},
|
||||||
|
required: ['group_id'],
|
||||||
|
} as const satisfies JSONSchema;
|
||||||
|
|
||||||
|
type Payload = FromSchema<typeof SchemaData>;
|
||||||
|
|
||||||
|
export class GetGroupShutList extends BaseAction<Payload, OB11Group> {
|
||||||
|
actionName = ActionName.GetGroupShutList;
|
||||||
|
payloadSchema = SchemaData;
|
||||||
|
|
||||||
|
async _handle(payload: Payload) {
|
||||||
|
return await this.core.apis.GroupApi.getGroupShutUpMemberList(payload.group_id.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -89,6 +89,7 @@ import { GetUserStatus } from './extends/GetUserStatus';
|
|||||||
import { GetRkey } from './extends/GetRkey';
|
import { GetRkey } from './extends/GetRkey';
|
||||||
import { SetSpecialTittle } from './extends/SetSpecialTittle';
|
import { SetSpecialTittle } from './extends/SetSpecialTittle';
|
||||||
import { UploadForwardMsg } from "@/onebot/action/extends/UploadForwardMsg";
|
import { UploadForwardMsg } from "@/onebot/action/extends/UploadForwardMsg";
|
||||||
|
import { GetGroupShutList } from './group/GetGroupShutList';
|
||||||
|
|
||||||
|
|
||||||
export type ActionMap = Map<string, BaseAction<any, any>>;
|
export type ActionMap = Map<string, BaseAction<any, any>>;
|
||||||
@ -190,6 +191,7 @@ export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCo
|
|||||||
new GetRkey(obContext, core),
|
new GetRkey(obContext, core),
|
||||||
new SetSpecialTittle(obContext, core),
|
new SetSpecialTittle(obContext, core),
|
||||||
new UploadForwardMsg(obContext, core),
|
new UploadForwardMsg(obContext, core),
|
||||||
|
new GetGroupShutList(obContext, core),
|
||||||
];
|
];
|
||||||
const actionMap = new Map();
|
const actionMap = new Map();
|
||||||
for (const action of actionHandlers) {
|
for (const action of actionHandlers) {
|
||||||
|
@ -124,4 +124,5 @@ export enum ActionName {
|
|||||||
GetRkey = "nc_get_rkey",
|
GetRkey = "nc_get_rkey",
|
||||||
SetSpecialTittle = "set_group_special_title",
|
SetSpecialTittle = "set_group_special_title",
|
||||||
UploadForwardMsg = "upload_forward_msg",
|
UploadForwardMsg = "upload_forward_msg",
|
||||||
|
GetGroupShutList = "get_goup_shut_list",
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user