mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
3 Commits
f44e48a28b
...
v3.6.3
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a06158bf01 | ||
![]() |
314e7485b8 | ||
![]() |
aed5d2d9f0 |
@@ -25,6 +25,7 @@ import { OidbSvcTrpcTcp0X929B_0Resp, OidbSvcTrpcTcp0X929D_0Resp } from "@/core/p
|
|||||||
import { IndexNode, MsgInfo } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
import { IndexNode, MsgInfo } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
||||||
import { NTV2RichMediaResp } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaResp";
|
import { NTV2RichMediaResp } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaResp";
|
||||||
import { RecvPacketData } from "@/core/packet/client/client";
|
import { RecvPacketData } from "@/core/packet/client/client";
|
||||||
|
import { napCatVersion } from "@/common/version";
|
||||||
|
|
||||||
|
|
||||||
interface OffsetType {
|
interface OffsetType {
|
||||||
@@ -61,11 +62,12 @@ export class NTQQPacketApi {
|
|||||||
this.qqVersion = qqversion;
|
this.qqVersion = qqversion;
|
||||||
const table = typedOffset[qqversion + '-' + os.arch()];
|
const table = typedOffset[qqversion + '-' + os.arch()];
|
||||||
if (!table) {
|
if (!table) {
|
||||||
this.logger.logError('[Core] [Packet] PacketServer Offset table not found for QQVersion: ', qqversion + '-' + os.arch());
|
this.logger.logError(`[Core] [Packet] PacketBackend 不支持当前QQ版本架构:${qqversion}-${os.arch()},
|
||||||
|
请参照 https://github.com/NapNeko/NapCatQQ/releases/tag/v${napCatVersion} 配置正确的QQ版本!`);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (this.core.configLoader.configData.packetBackend === 'disable') {
|
if (this.core.configLoader.configData.packetBackend === 'disable') {
|
||||||
this.logger.logWarn('[Core] [Packet] 已禁用Packet后端,NapCat.Packet将不会加载!');
|
this.logger.logWarn('[Core] [Packet] 已禁用PacketBackend,NapCat.Packet将不会加载!');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.packetSession = new PacketSession(this.core);
|
this.packetSession = new PacketSession(this.core);
|
||||||
|
@@ -45,7 +45,7 @@ export class PacketSession {
|
|||||||
client = this.judgeClient(core);
|
client = this.judgeClient(core);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.logger.logError(`[Core] [Packet] 未知的Packet后端类型 ${prefer},请检查配置文件!`);
|
this.logger.logError(`[Core] [Packet] 未知的PacketBackend ${prefer},请检查配置文件!`);
|
||||||
client = null;
|
client = null;
|
||||||
}
|
}
|
||||||
if (!(client && client.check(core))) {
|
if (!(client && client.check(core))) {
|
||||||
|
@@ -5,7 +5,7 @@ import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
|||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
group_id: { type: 'string' },
|
group_id: { type: ['string', 'number'] },
|
||||||
},
|
},
|
||||||
required: ['group_id'],
|
required: ['group_id'],
|
||||||
} as const satisfies JSONSchema;
|
} as const satisfies JSONSchema;
|
||||||
@@ -17,7 +17,7 @@ export class SetGroupSign extends BaseAction<Payload, any> {
|
|||||||
payloadSchema = SchemaData;
|
payloadSchema = SchemaData;
|
||||||
|
|
||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
return await this.core.apis.PacketApi.sendGroupSignPacket(payload.group_id);
|
return await this.core.apis.PacketApi.sendGroupSignPacket(payload.group_id.toString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
export class SendGroupSign extends SetGroupSign {
|
export class SendGroupSign extends SetGroupSign {
|
||||||
|
Reference in New Issue
Block a user