mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
release: 2.2.20
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "2.2.19",
|
"version": "2.2.20",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "2.2.19",
|
"version": "2.2.20",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:framework": "vite build --mode framework",
|
"build:framework": "vite build --mode framework",
|
||||||
"build:shell": "vite build --mode shell",
|
"build:shell": "vite build --mode shell",
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '2.2.19';
|
export const napCatVersion = '2.2.20';
|
||||||
|
@@ -33,11 +33,6 @@ export class NTQQGroupApi {
|
|||||||
}
|
}
|
||||||
this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`);
|
this.context.logger.logDebug(`加载${this.groups.length}个群组缓存完成`);
|
||||||
}
|
}
|
||||||
async getGroupInfoEx(groupCode: string) {
|
|
||||||
const groupDetail = await this.context.session.getGroupService().getGroupDetailInfo(groupCode, GroupInfoSource.KDATACARD);
|
|
||||||
const groupExtInfo = await this.getGroupExtFE0Info([groupCode]);
|
|
||||||
return { groupDetail, groupExtInfo };
|
|
||||||
}
|
|
||||||
async setGroupAvatar(gc: string, filePath: string) {
|
async setGroupAvatar(gc: string, filePath: string) {
|
||||||
return this.context.session.getGroupService().setHeader(gc, filePath);
|
return this.context.session.getGroupService().setHeader(gc, filePath);
|
||||||
}
|
}
|
||||||
|
@@ -14,9 +14,9 @@ import { GeneralCallResult } from '@/core/services/common';
|
|||||||
//高版本的接口不应该随意使用 使用应该严格进行pr审核 同时部分ipc中未出现的接口不要过于依赖 应该做好数据兜底
|
//高版本的接口不应该随意使用 使用应该严格进行pr审核 同时部分ipc中未出现的接口不要过于依赖 应该做好数据兜底
|
||||||
|
|
||||||
export interface NodeIKernelGroupService {
|
export interface NodeIKernelGroupService {
|
||||||
//getGroupExt0xEF0Info(this.$enableGroupCodes, this.$bannedGroupCodes, this.$filter, this.$forceFetch
|
|
||||||
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
getGroupExt0xEF0Info(enableGroupCodes: string[], bannedGroupCodes: string[], filter: GroupExt0xEF0InfoFilter, forceFetch: boolean):
|
||||||
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, any> } }>;
|
Promise<GeneralCallResult & { result: { groupExtInfos: Map<string, any> } }>;
|
||||||
|
|
||||||
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
|
kickMemberV2(param: KickMemberV2Req): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
quitGroupV2(param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
quitGroupV2(param: { groupCode: string; needDeleteLocalMsg: boolean; }): Promise<GeneralCallResult>;
|
||||||
@@ -40,11 +40,11 @@ export interface NodeIKernelGroupService {
|
|||||||
realSpecialTitleFlag: number
|
realSpecialTitleFlag: number
|
||||||
}): Promise<unknown>;
|
}): Promise<unknown>;
|
||||||
|
|
||||||
//26702
|
|
||||||
getGroupMemberLevelInfo(groupCode: string): Promise<unknown>;
|
getGroupMemberLevelInfo(groupCode: string): Promise<unknown>;
|
||||||
|
|
||||||
//26702
|
getGroupInfoForJoinGroup(groupCode: string, needPrivilegeFlag: boolean, serviceType: number): Promise<unknown>;
|
||||||
getGroupHonorList(groupCodes: Array<string>): unknown;
|
|
||||||
|
getGroupHonorList(req: { groupCodes: Array<string> }): Promise<unknown>;
|
||||||
|
|
||||||
getUinByUids(uins: string[]): Promise<{
|
getUinByUids(uins: string[]): Promise<{
|
||||||
errCode: number,
|
errCode: number,
|
||||||
@@ -58,13 +58,10 @@ export interface NodeIKernelGroupService {
|
|||||||
uids: Map<string, string>
|
uids: Map<string, string>
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
checkGroupMemberCache(arrayList: Array<string>): Promise<unknown>;
|
checkGroupMemberCache(arrayList: Array<string>): Promise<unknown>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
getGroupLatestEssenceList(groupCode: string): Promise<unknown>;
|
getGroupLatestEssenceList(groupCode: string): Promise<unknown>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
shareDigest(Req: {
|
shareDigest(Req: {
|
||||||
appId: string,
|
appId: string,
|
||||||
appType: number,
|
appType: number,
|
||||||
@@ -84,20 +81,17 @@ export interface NodeIKernelGroupService {
|
|||||||
}
|
}
|
||||||
}): Promise<unknown>;
|
}): Promise<unknown>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
isEssenceMsg(Req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
isEssenceMsg(Req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
queryCachedEssenceMsg(Req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
queryCachedEssenceMsg(Req: { groupCode: string, msgRandom: number, msgSeq: number }): Promise<unknown>;
|
||||||
|
|
||||||
//26702(其实更早 但是我不知道)
|
|
||||||
fetchGroupEssenceList(Req: {
|
fetchGroupEssenceList(Req: {
|
||||||
groupCode: string,
|
groupCode: string,
|
||||||
pageStart: number,
|
pageStart: number,
|
||||||
pageLimit: number
|
pageLimit: number
|
||||||
}, Arg: unknown): Promise<unknown>;
|
}, Arg: unknown): Promise<unknown>;
|
||||||
|
|
||||||
//26702
|
|
||||||
getAllMemberList(groupCode: string, forceFetch: boolean): Promise<{
|
getAllMemberList(groupCode: string, forceFetch: boolean): Promise<{
|
||||||
errCode: number,
|
errCode: number,
|
||||||
errMsg: string,
|
errMsg: string,
|
||||||
@@ -136,8 +130,6 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
getMemberInfo(group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
getMemberInfo(group_id: string, uids: string[], forceFetch: boolean): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
//getMemberInfo [ '56729xxxx', [ 'u_4Nj08cwW5Hxxxxx' ], true ]
|
|
||||||
|
|
||||||
kickMember(groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
kickMember(groupCode: string, memberUids: string[], refuseForever: boolean, kickReason: string): Promise<void>;
|
||||||
|
|
||||||
modifyMemberRole(groupCode: string, uid: string, role: GroupMemberRole): void;
|
modifyMemberRole(groupCode: string, uid: string, role: GroupMemberRole): void;
|
||||||
@@ -152,7 +144,7 @@ export interface NodeIKernelGroupService {
|
|||||||
|
|
||||||
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
|
getGroupExtList(force: boolean): Promise<GeneralCallResult>;
|
||||||
|
|
||||||
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): unknown;
|
getGroupDetailInfo(groupCode: string, groupInfoSource: GroupInfoSource): Promise<unknown>;
|
||||||
|
|
||||||
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req
|
getMemberExtInfo(param: GroupExtParam): Promise<unknown>;//req
|
||||||
|
|
||||||
|
24
src/onebot/action/extends/GetGroupInfoEx.ts
Normal file
24
src/onebot/action/extends/GetGroupInfoEx.ts
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
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 GetGroupInfoEx extends BaseAction<Payload, any> {
|
||||||
|
actionName = ActionName.GetGroupInfoEx;
|
||||||
|
payloadSchema = SchemaData;
|
||||||
|
|
||||||
|
async _handle(payload: Payload) {
|
||||||
|
const NTQQGroupApi = this.core.apis.GroupApi;
|
||||||
|
const groupInfoEx = (await NTQQGroupApi.getGroupExtFE0Info([payload.group_id.toString()])).result.groupExtInfos.get(payload.group_id.toString());
|
||||||
|
return groupInfoEx;
|
||||||
|
}
|
||||||
|
}
|
@@ -81,11 +81,13 @@ import SetModelShow from './go-cqhttp/SetModelShow';
|
|||||||
import { SetInputStatus } from './extends/SetInputStatus';
|
import { SetInputStatus } from './extends/SetInputStatus';
|
||||||
import { GetCSRF } from './system/GetCSRF';
|
import { GetCSRF } from './system/GetCSRF';
|
||||||
import { DelGroupNotice } from './group/DelGroupNotice';
|
import { DelGroupNotice } from './group/DelGroupNotice';
|
||||||
|
import { GetGroupInfoEx } from './extends/GetGroupInfoEx';
|
||||||
|
|
||||||
export type ActionMap = Map<string, BaseAction<any, any>>;
|
export type ActionMap = Map<string, BaseAction<any, any>>;
|
||||||
|
|
||||||
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore): ActionMap {
|
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore): ActionMap {
|
||||||
const actionHandlers = [
|
const actionHandlers = [
|
||||||
|
new GetGroupInfoEx(obContext, core),
|
||||||
new FetchEmojiLike(obContext, core),
|
new FetchEmojiLike(obContext, core),
|
||||||
new GetFile(obContext, core),
|
new GetFile(obContext, core),
|
||||||
new SetQQProfile(obContext, core),
|
new SetQQProfile(obContext, core),
|
||||||
|
@@ -110,4 +110,5 @@ export enum ActionName {
|
|||||||
SetInputStatus = 'set_input_status',
|
SetInputStatus = 'set_input_status',
|
||||||
GetCSRF = 'get_csrf_token',
|
GetCSRF = 'get_csrf_token',
|
||||||
DelGroupNotice = '_del_group_notice',
|
DelGroupNotice = '_del_group_notice',
|
||||||
|
GetGroupInfoEx = "get_group_info_ex"
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"http": {
|
"http": {
|
||||||
"enable": true,
|
"enable": false,
|
||||||
"host": "",
|
"host": "",
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"secret": "",
|
"secret": "",
|
||||||
|
@@ -30,7 +30,7 @@ async function onSettingWindowCreated(view: Element) {
|
|||||||
SettingItem(
|
SettingItem(
|
||||||
'<span id="napcat-update-title">Napcat</span>',
|
'<span id="napcat-update-title">Napcat</span>',
|
||||||
undefined,
|
undefined,
|
||||||
SettingButton('V2.2.19', 'napcat-update-button', 'secondary'),
|
SettingButton('V2.2.20', 'napcat-update-button', 'secondary'),
|
||||||
),
|
),
|
||||||
]),
|
]),
|
||||||
SettingList([
|
SettingList([
|
||||||
|
@@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
|
|||||||
SettingItem(
|
SettingItem(
|
||||||
'<span id="napcat-update-title">Napcat</span>',
|
'<span id="napcat-update-title">Napcat</span>',
|
||||||
void 0,
|
void 0,
|
||||||
SettingButton("V2.2.19", "napcat-update-button", "secondary")
|
SettingButton("V2.2.20", "napcat-update-button", "secondary")
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
SettingList([
|
SettingList([
|
||||||
|
Reference in New Issue
Block a user