mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
3 Commits
v3.4.7
...
90ec774a21
Author | SHA1 | Date | |
---|---|---|---|
![]() |
90ec774a21 | ||
![]() |
db7a27e624 | ||
![]() |
f7d965eda2 |
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "3.4.6",
|
"version": "3.4.7",
|
||||||
"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": "3.4.6",
|
"version": "3.4.7",
|
||||||
"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",
|
||||||
|
@@ -84,7 +84,7 @@ export class QQBasicInfoWrapper {
|
|||||||
}
|
}
|
||||||
// 通过Major拉取 性能差
|
// 通过Major拉取 性能差
|
||||||
try {
|
try {
|
||||||
let majorAppid = this.getAppidV2ByMajor(fullVersion);
|
const majorAppid = this.getAppidV2ByMajor(fullVersion);
|
||||||
if (majorAppid) {
|
if (majorAppid) {
|
||||||
this.context.logger.log(`[QQ版本兼容性检测] 当前版本Appid未内置 通过Major获取 为了更好的性能请尝试更新NapCat`);
|
this.context.logger.log(`[QQ版本兼容性检测] 当前版本Appid未内置 通过Major获取 为了更好的性能请尝试更新NapCat`);
|
||||||
return { appid: majorAppid, qua: this.getQUAFallback() };
|
return { appid: majorAppid, qua: this.getQUAFallback() };
|
||||||
@@ -98,8 +98,8 @@ export class QQBasicInfoWrapper {
|
|||||||
return { appid: this.getAppIdFallback(), qua: this.getQUAFallback() };
|
return { appid: this.getAppIdFallback(), qua: this.getQUAFallback() };
|
||||||
}
|
}
|
||||||
getAppidV2ByMajor(QQVersion: string) {
|
getAppidV2ByMajor(QQVersion: string) {
|
||||||
let majorPath = getMajorPath(QQVersion);
|
const majorPath = getMajorPath(QQVersion);
|
||||||
let appid = parseAppidFromMajor(majorPath);
|
const appid = parseAppidFromMajor(majorPath);
|
||||||
return appid;
|
return appid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '3.4.6';
|
export const napCatVersion = '3.4.7';
|
||||||
|
@@ -54,7 +54,7 @@ export class NTQQGroupApi {
|
|||||||
}, pskey);
|
}, pskey);
|
||||||
}
|
}
|
||||||
async getGroupShutUpMemberList(groupCode: string) {
|
async getGroupShutUpMemberList(groupCode: string) {
|
||||||
let data = this.core.eventWrapper.registerListen('NodeIKernelGroupListener/onShutUpMemberListChanged', 1, 1000, (group_id) => group_id === groupCode);
|
const data = this.core.eventWrapper.registerListen('NodeIKernelGroupListener/onShutUpMemberListChanged', 1, 1000, (group_id) => group_id === groupCode);
|
||||||
this.context.session.getGroupService().getGroupShutUpMemberList(groupCode);
|
this.context.session.getGroupService().getGroupShutUpMemberList(groupCode);
|
||||||
return (await data)[1];
|
return (await data)[1];
|
||||||
}
|
}
|
||||||
|
@@ -241,7 +241,7 @@ export class PacketMsgMarkFaceElement extends IPacketMsgElement<SendMarketFaceEl
|
|||||||
}
|
}
|
||||||
|
|
||||||
toPreview(): string {
|
toPreview(): string {
|
||||||
return `[${this.emojiName}]`;
|
return `${this.emojiName}`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,8 +28,8 @@ import { OidbSvcTrpcTcp0XE37_800 } from "@/core/packet/proto/oidb/Oidb.0XE37_800
|
|||||||
import { OidbSvcTrpcTcp0XEB7 } from "./proto/oidb/Oidb.0xEB7";
|
import { OidbSvcTrpcTcp0XEB7 } from "./proto/oidb/Oidb.0xEB7";
|
||||||
import { MiniAppReqParams } from "@/core/packet/entities/miniApp";
|
import { MiniAppReqParams } from "@/core/packet/entities/miniApp";
|
||||||
import { MiniAppAdaptShareInfoReq } from "@/core/packet/proto/action/miniAppAdaptShareInfo";
|
import { MiniAppAdaptShareInfoReq } from "@/core/packet/proto/action/miniAppAdaptShareInfo";
|
||||||
import {AIVoiceChatType} from "@/core/packet/entities/aiChat";
|
import { AIVoiceChatType } from "@/core/packet/entities/aiChat";
|
||||||
import {OidbSvcTrpcTcp0X929B_0, OidbSvcTrpcTcp0X929D_0} from "@/core/packet/proto/oidb/Oidb.0x929";
|
import { OidbSvcTrpcTcp0X929B_0, OidbSvcTrpcTcp0X929D_0 } from "@/core/packet/proto/oidb/Oidb.0x929";
|
||||||
|
|
||||||
export type PacketHexStr = string & { readonly hexNya: unique symbol };
|
export type PacketHexStr = string & { readonly hexNya: unique symbol };
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import {ActionName} from '../types';
|
import { ActionName } from '../types';
|
||||||
import {FromSchema, JSONSchema} from 'json-schema-to-ts';
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
import {GetPacketStatusDepends} from "@/onebot/action/packet/GetPacketStatus";
|
import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
|
||||||
import {AIVoiceChatType} from "@/core/packet/entities/aiChat";
|
import { AIVoiceChatType } from "@/core/packet/entities/aiChat";
|
||||||
|
|
||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
import {ActionName} from '../types';
|
import { ActionName } from '../types';
|
||||||
import {FromSchema, JSONSchema} from 'json-schema-to-ts';
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
import {GetPacketStatusDepends} from "@/onebot/action/packet/GetPacketStatus";
|
import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
|
||||||
import {AIVoiceChatType} from "@/core/packet/entities/aiChat";
|
import { AIVoiceChatType } from "@/core/packet/entities/aiChat";
|
||||||
import {NapProtoEncodeStructType} from "@/core/packet/proto/NapProto";
|
import { NapProtoEncodeStructType } from "@/core/packet/proto/NapProto";
|
||||||
import {IndexNode} from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
import { IndexNode } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
||||||
|
|
||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
@@ -1,11 +1,11 @@
|
|||||||
import {ActionName} from '../types';
|
import { ActionName } from '../types';
|
||||||
import {FromSchema, JSONSchema} from 'json-schema-to-ts';
|
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||||
import {GetPacketStatusDepends} from "@/onebot/action/packet/GetPacketStatus";
|
import { GetPacketStatusDepends } from "@/onebot/action/packet/GetPacketStatus";
|
||||||
import {AIVoiceChatType} from "@/core/packet/entities/aiChat";
|
import { AIVoiceChatType } from "@/core/packet/entities/aiChat";
|
||||||
import {uri2local} from "@/common/file";
|
import { uri2local } from "@/common/file";
|
||||||
import {ChatType, Peer} from "@/core";
|
import { ChatType, Peer } from "@/core";
|
||||||
import {NapProtoEncodeStructType} from "@/core/packet/proto/NapProto";
|
import { NapProtoEncodeStructType } from "@/core/packet/proto/NapProto";
|
||||||
import {IndexNode} from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
import { IndexNode } from "@/core/packet/proto/oidb/common/Ntv2.RichMediaReq";
|
||||||
|
|
||||||
const SchemaData = {
|
const SchemaData = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
@@ -28,13 +28,13 @@ export class SendGroupAiRecord extends GetPacketStatusDepends<Payload, {
|
|||||||
async _handle(payload: Payload) {
|
async _handle(payload: Payload) {
|
||||||
const rawRsp = await this.core.apis.PacketApi.sendAiVoiceChatReq(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
|
const rawRsp = await this.core.apis.PacketApi.sendAiVoiceChatReq(+payload.group_id, payload.character, payload.text, AIVoiceChatType.Sound);
|
||||||
const url = await this.core.apis.PacketApi.sendGroupPttFileDownloadReq(+payload.group_id, rawRsp.msgInfoBody[0].index);
|
const url = await this.core.apis.PacketApi.sendGroupPttFileDownloadReq(+payload.group_id, rawRsp.msgInfoBody[0].index);
|
||||||
const { path, fileName, errMsg, success} = (await uri2local(this.core.NapCatTempPath, url));
|
const { path, fileName, errMsg, success } = (await uri2local(this.core.NapCatTempPath, url));
|
||||||
if (!success) {
|
if (!success) {
|
||||||
throw new Error(errMsg);
|
throw new Error(errMsg);
|
||||||
}
|
}
|
||||||
const peer = {chatType: ChatType.KCHATTYPEGROUP, peerUid: payload.group_id.toString()} as Peer;
|
const peer = { chatType: ChatType.KCHATTYPEGROUP, peerUid: payload.group_id.toString() } as Peer;
|
||||||
const element = await this.core.apis.FileApi.createValidSendPttElement(path);
|
const element = await this.core.apis.FileApi.createValidSendPttElement(path);
|
||||||
const sendRes = await this.obContext.apis.MsgApi.sendMsgWithOb11UniqueId(peer, [element], [path]);
|
const sendRes = await this.obContext.apis.MsgApi.sendMsgWithOb11UniqueId(peer, [element], [path]);
|
||||||
return {message_id: sendRes.msgId};
|
return { message_id: sendRes.msgId };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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("V3.4.6", "napcat-update-button", "secondary")
|
SettingButton("V3.4.7", "napcat-update-button", "secondary")
|
||||||
)
|
)
|
||||||
]),
|
]),
|
||||||
SettingList([
|
SettingList([
|
||||||
|
Reference in New Issue
Block a user