mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
26 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
7330a05c78 | ||
![]() |
a39c932868 | ||
![]() |
a2c24c9197 | ||
![]() |
5c3efc681f | ||
![]() |
e70d2bd708 | ||
![]() |
cf75a961fb | ||
![]() |
159f317071 | ||
![]() |
713eef592a | ||
![]() |
cf03ad8fd9 | ||
![]() |
0c0b27901a | ||
![]() |
137fe3c8f2 | ||
![]() |
d96174076a | ||
![]() |
6d5662d96e | ||
![]() |
57abd47d99 | ||
![]() |
5092b3d791 | ||
![]() |
649409d1be | ||
![]() |
8f549d896a | ||
![]() |
a1359ddbb5 | ||
![]() |
304a0dda3e | ||
![]() |
fff9c4a4d8 | ||
![]() |
2c76102fc4 | ||
![]() |
f576cd9417 | ||
![]() |
9cfd224b74 | ||
![]() |
c12f8de8b4 | ||
![]() |
ed9a7c52e2 | ||
![]() |
38fcaaa28b |
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -150,3 +150,15 @@ jobs:
|
|||||||
NapCat.Shell.zip
|
NapCat.Shell.zip
|
||||||
NapCat.Framework.Windows.Once.zip
|
NapCat.Framework.Windows.Once.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
needs: release-napcat
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Dispatch Docker Build
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.NAPCAT_BUILD }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
https://api.github.com/repos/NapNeko/NapCat-Docker/actions/workflows/docker-publish.yml/dispatches \
|
||||||
|
-d '{"ref": "main"}'
|
||||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,5 @@
|
|||||||
# Develop
|
# Develop
|
||||||
node_modules/
|
node_modules/
|
||||||
package-lock.json
|
|
||||||
pnpm-lock.yaml
|
pnpm-lock.yaml
|
||||||
out/
|
out/
|
||||||
dist/
|
dist/
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.7.77",
|
"version": "4.8.93",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
15995
napcat.webui/package-lock.json
generated
Normal file
15995
napcat.webui/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -26,7 +26,7 @@ const itemVariants = {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
y: 0,
|
y: 0,
|
||||||
transition: { type: 'spring', stiffness: 300, damping: 20 }
|
transition: { type: 'spring' as const, stiffness: 300, damping: 20 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8301
package-lock.json
generated
Normal file
8301
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
10
package.json
10
package.json
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.7.77",
|
"version": "4.8.93",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
||||||
@@ -18,14 +18,14 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/preset-typescript": "^7.24.7",
|
"@babel/preset-typescript": "^7.24.7",
|
||||||
"@eslint/compat": "^1.2.2",
|
"@eslint/compat": "^1.3.1",
|
||||||
"@eslint/eslintrc": "^3.1.0",
|
"@eslint/eslintrc": "^3.1.0",
|
||||||
"@eslint/js": "^9.14.0",
|
"@eslint/js": "^9.30.1",
|
||||||
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
|
"@homebridge/node-pty-prebuilt-multiarch": "^0.12.0-beta.5",
|
||||||
"@log4js-node/log4js-api": "^1.0.2",
|
"@log4js-node/log4js-api": "^1.0.2",
|
||||||
"@napneko/nap-proto-core": "^0.0.4",
|
"@napneko/nap-proto-core": "^0.0.4",
|
||||||
"@rollup/plugin-node-resolve": "^16.0.0",
|
"@rollup/plugin-node-resolve": "^16.0.0",
|
||||||
"@rollup/plugin-typescript": "^12.1.2",
|
"@rollup/plugin-typescript": "^12.1.4",
|
||||||
"@sinclair/typebox": "^0.34.9",
|
"@sinclair/typebox": "^0.34.9",
|
||||||
"@types/cors": "^2.8.17",
|
"@types/cors": "^2.8.17",
|
||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.0",
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
"json5": "^2.2.3",
|
"json5": "^2.2.3",
|
||||||
"multer": "^2.0.1",
|
"multer": "^2.0.1",
|
||||||
"typescript": "^5.3.3",
|
"typescript": "^5.3.3",
|
||||||
"typescript-eslint": "^8.13.0",
|
"typescript-eslint": "^8.35.1",
|
||||||
"vite": "^6.0.1",
|
"vite": "^6.0.1",
|
||||||
"vite-plugin-cp": "^6.0.0",
|
"vite-plugin-cp": "^6.0.0",
|
||||||
"vite-tsconfig-paths": "^5.1.0",
|
"vite-tsconfig-paths": "^5.1.0",
|
||||||
|
@@ -10,10 +10,14 @@ import { LogWrapper } from './log';
|
|||||||
|
|
||||||
const downloadOri = "https://github.com/NapNeko/ffmpeg-build/releases/download/v1.0.0/ffmpeg-7.1.1-win64.zip"
|
const downloadOri = "https://github.com/NapNeko/ffmpeg-build/releases/download/v1.0.0/ffmpeg-7.1.1-win64.zip"
|
||||||
const urls = [
|
const urls = [
|
||||||
"https://github.moeyy.xyz/" + downloadOri,
|
"https://j.1win.ggff.net/" + downloadOri,
|
||||||
"https://ghp.ci/" + downloadOri,
|
"https://git.yylx.win/" + downloadOri,
|
||||||
"https://gh.api.99988866.xyz/" + downloadOri,
|
"https://ghfile.geekertao.top/" + downloadOri,
|
||||||
"https://gh.api.99988866.xyz/" + downloadOri,
|
"https://gh-proxy.net/" + downloadOri,
|
||||||
|
"https://ghm.078465.xyz/" + downloadOri,
|
||||||
|
"https://gitproxy.127731.xyz/" + downloadOri,
|
||||||
|
"https://jiashu.1win.eu.org/" + downloadOri,
|
||||||
|
"https://github.tbedu.top/" + downloadOri,
|
||||||
downloadOri
|
downloadOri
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '4.7.77';
|
export const napCatVersion = '4.8.93';
|
||||||
|
24
src/core/external/appid.json
vendored
24
src/core/external/appid.json
vendored
@@ -314,5 +314,29 @@
|
|||||||
"9.9.20-35951": {
|
"9.9.20-35951": {
|
||||||
"appid": 537295977,
|
"appid": 537295977,
|
||||||
"qua": "V1_WIN_NQ_9.9.20_35951_GW_B"
|
"qua": "V1_WIN_NQ_9.9.20_35951_GW_B"
|
||||||
|
},
|
||||||
|
"3.2.18-36580": {
|
||||||
|
"appid": 537298509,
|
||||||
|
"qua": "V1_LNX_NQ_3.2.18_36580_GW_B"
|
||||||
|
},
|
||||||
|
"9.9.20-36580": {
|
||||||
|
"appid": 537298473,
|
||||||
|
"qua": "V1_WIN_NQ_9.9.20_36580_GW_B"
|
||||||
|
},
|
||||||
|
"9.9.20-37012": {
|
||||||
|
"appid": 537304071,
|
||||||
|
"qua": "V1_WIN_NQ_9.9.20_37012_GW_B"
|
||||||
|
},
|
||||||
|
"3.2.18-37012": {
|
||||||
|
"appid": 537304107,
|
||||||
|
"qua": "V1_LNX_NQ_3.2.18_37012_GW_B"
|
||||||
|
},
|
||||||
|
"3.2.18-37051": {
|
||||||
|
"appid": 537304158,
|
||||||
|
"qua": "V1_LNX_NQ_3.2.18_37051_GW_B"
|
||||||
|
},
|
||||||
|
"9.9.20-37051": {
|
||||||
|
"appid": 537304122,
|
||||||
|
"qua": "V1_WIN_NQ_9.9.20_37051_GW_B"
|
||||||
}
|
}
|
||||||
}
|
}
|
36
src/core/external/offset.json
vendored
36
src/core/external/offset.json
vendored
@@ -402,5 +402,41 @@
|
|||||||
"3.2.18-35951-x64": {
|
"3.2.18-35951-x64": {
|
||||||
"send": "AFBBB00",
|
"send": "AFBBB00",
|
||||||
"recv": "AFBF520"
|
"recv": "AFBF520"
|
||||||
|
},
|
||||||
|
"9.9.20-36580-x64": {
|
||||||
|
"send": "30824B8",
|
||||||
|
"recv": "3085C5C"
|
||||||
|
},
|
||||||
|
"3.2.18-36580-x64": {
|
||||||
|
"send": "B0853E0",
|
||||||
|
"recv": "B088E60"
|
||||||
|
},
|
||||||
|
"3.2.18-36580-arm64": {
|
||||||
|
"send": "793DAC8",
|
||||||
|
"recv": "7941458"
|
||||||
|
},
|
||||||
|
"3.2.18-37012-x64": {
|
||||||
|
"send": "B20F960",
|
||||||
|
"recv": "B2133E0"
|
||||||
|
},
|
||||||
|
"3.2.18-37012-arm64": {
|
||||||
|
"send": "7A19E00",
|
||||||
|
"recv": "7A1D790"
|
||||||
|
},
|
||||||
|
"9.9.20-37012-x64": {
|
||||||
|
"send": "30CC958",
|
||||||
|
"recv": "30D00FC"
|
||||||
|
},
|
||||||
|
"3.2.18-37051-x64": {
|
||||||
|
"send": "B20F960",
|
||||||
|
"recv": "B2133E0"
|
||||||
|
},
|
||||||
|
"3.2.18-37051-arm64": {
|
||||||
|
"send": "7A19E00",
|
||||||
|
"recv": "7A1D790"
|
||||||
|
},
|
||||||
|
"9.9.20-37051-x64": {
|
||||||
|
"send": "30CC958",
|
||||||
|
"recv": "30D00FC"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -40,7 +40,8 @@ export class NativePacketClient extends IPacketClient {
|
|||||||
|
|
||||||
async init(_pid: number, recv: string, send: string): Promise<void> {
|
async init(_pid: number, recv: string, send: string): Promise<void> {
|
||||||
const platform = process.platform + '.' + process.arch;
|
const platform = process.platform + '.' + process.arch;
|
||||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + '.node');
|
const isNewQQ = this.napcore.basicInfo.requireMinNTQQBuild("36580");
|
||||||
|
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + (isNewQQ ? '.new' : '') + '.node');
|
||||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||||
|
|
||||||
this.MoeHooExport.exports.InitHook?.(send, recv, (type: number, _uin: string, cmd: string, seq: number, hex_data: string) => {
|
this.MoeHooExport.exports.InitHook?.(send, recv, (type: number, _uin: string, cmd: string, seq: number, hex_data: string) => {
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { NapCatCore } from '@/core';
|
import { NapCatCore } from '@/core';
|
||||||
|
|
||||||
export interface NapCoreCompatBasicInfo {
|
export interface NapCoreCompatBasicInfo {
|
||||||
|
readonly requireMinNTQQBuild: (buildVer: string) => boolean;
|
||||||
readonly uin: number;
|
readonly uin: number;
|
||||||
readonly uid: string;
|
readonly uid: string;
|
||||||
readonly uin2uid: (uin: number) => Promise<string>;
|
readonly uin2uid: (uin: number) => Promise<string>;
|
||||||
@@ -21,6 +22,7 @@ export class NapCoreContext {
|
|||||||
|
|
||||||
get basicInfo() {
|
get basicInfo() {
|
||||||
return {
|
return {
|
||||||
|
requireMinNTQQBuild: (buildVer: string) => this.core.context.basicInfoWrapper.requireMinNTQQBuild(buildVer),
|
||||||
uin: +this.core.selfInfo.uin,
|
uin: +this.core.selfInfo.uin,
|
||||||
uid: this.core.selfInfo.uid,
|
uid: this.core.selfInfo.uid,
|
||||||
uin2uid: (uin: number) => this.core.apis.UserApi.getUidByUinV2(String(uin)).then(res => res ?? ''),
|
uin2uid: (uin: number) => this.core.apis.UserApi.getUidByUinV2(String(uin)).then(res => res ?? ''),
|
||||||
|
BIN
src/native/packet/MoeHoo.linux.arm64.new.node
Normal file
BIN
src/native/packet/MoeHoo.linux.arm64.new.node
Normal file
Binary file not shown.
BIN
src/native/packet/MoeHoo.linux.x64.new.node
Normal file
BIN
src/native/packet/MoeHoo.linux.x64.new.node
Normal file
Binary file not shown.
BIN
src/native/packet/MoeHoo.win32.x64.new.node
Normal file
BIN
src/native/packet/MoeHoo.win32.x64.new.node
Normal file
Binary file not shown.
@@ -4,6 +4,7 @@ import { ActionName } from '@/onebot/action/router';
|
|||||||
import { Notify } from '@/onebot/types';
|
import { Notify } from '@/onebot/types';
|
||||||
|
|
||||||
interface RetData {
|
interface RetData {
|
||||||
|
invited_requests: Notify[];
|
||||||
InvitedRequest: Notify[];
|
InvitedRequest: Notify[];
|
||||||
join_requests: Notify[];
|
join_requests: Notify[];
|
||||||
}
|
}
|
||||||
@@ -13,7 +14,7 @@ export class GetGroupIgnoredNotifies extends OneBotAction<void, RetData> {
|
|||||||
|
|
||||||
async _handle(): Promise<RetData> {
|
async _handle(): Promise<RetData> {
|
||||||
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, 50);
|
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, 50);
|
||||||
const retData: RetData = { InvitedRequest: [], join_requests: [] };
|
const retData: RetData = { invited_requests: [], InvitedRequest: [], join_requests: [] };
|
||||||
|
|
||||||
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
||||||
const invitorUin = SSNotify.user1?.uid ? +await this.core.apis.UserApi.getUinByUidV2(SSNotify.user1.uid) : 0;
|
const invitorUin = SSNotify.user1?.uid ? +await this.core.apis.UserApi.getUinByUidV2(SSNotify.user1.uid) : 0;
|
||||||
@@ -38,7 +39,7 @@ export class GetGroupIgnoredNotifies extends OneBotAction<void, RetData> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await Promise.all(notifyPromises);
|
await Promise.all(notifyPromises);
|
||||||
|
retData.invited_requests = retData.InvitedRequest;
|
||||||
return retData;
|
return retData;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -121,6 +121,8 @@ import SetGroupSearch from './extends/SetGroupSearch';
|
|||||||
import SetGroupRobotAddOption from './extends/SetGroupRobotAddOption';
|
import SetGroupRobotAddOption from './extends/SetGroupRobotAddOption';
|
||||||
import SetGroupKickMembers from './extends/SetGroupKickMembers';
|
import SetGroupKickMembers from './extends/SetGroupKickMembers';
|
||||||
import { GetGroupDetailInfo } from './group/GetGroupDetailInfo';
|
import { GetGroupDetailInfo } from './group/GetGroupDetailInfo';
|
||||||
|
import GetGroupAddRequest from './extends/GetGroupAddRequest';
|
||||||
|
import { GetCollectionList } from './extends/GetCollectionList';
|
||||||
|
|
||||||
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||||
|
|
||||||
@@ -257,6 +259,8 @@ export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCo
|
|||||||
new GetPrivateFileUrl(obContext, core),
|
new GetPrivateFileUrl(obContext, core),
|
||||||
new GetUnidirectionalFriendList(obContext, core),
|
new GetUnidirectionalFriendList(obContext, core),
|
||||||
new CleanCache(obContext, core),
|
new CleanCache(obContext, core),
|
||||||
|
new GetGroupAddRequest(obContext, core),
|
||||||
|
new GetCollectionList(obContext, core),
|
||||||
];
|
];
|
||||||
|
|
||||||
type HandlerUnion = typeof actionHandlers[number];
|
type HandlerUnion = typeof actionHandlers[number];
|
||||||
|
@@ -2,6 +2,7 @@ import { GroupNotifyMsgStatus } from '@/core';
|
|||||||
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
import { OneBotAction } from '@/onebot/action/OneBotAction';
|
||||||
import { ActionName } from '@/onebot/action/router';
|
import { ActionName } from '@/onebot/action/router';
|
||||||
import { Notify } from '@/onebot/types';
|
import { Notify } from '@/onebot/types';
|
||||||
|
import { Static, Type } from '@sinclair/typebox';
|
||||||
|
|
||||||
interface RetData {
|
interface RetData {
|
||||||
invited_requests: Notify[];
|
invited_requests: Notify[];
|
||||||
@@ -9,11 +10,18 @@ interface RetData {
|
|||||||
join_requests: Notify[];
|
join_requests: Notify[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetGroupSystemMsg extends OneBotAction<void, RetData> {
|
const SchemaData = Type.Object({
|
||||||
override actionName = ActionName.GetGroupSystemMsg;
|
count: Type.Union([Type.Number(), Type.String()], { default: 50 }),
|
||||||
|
});
|
||||||
|
|
||||||
async _handle(): Promise<RetData> {
|
type Payload = Static<typeof SchemaData>;
|
||||||
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, 50);
|
|
||||||
|
export class GetGroupSystemMsg extends OneBotAction<Payload, RetData> {
|
||||||
|
override actionName = ActionName.GetGroupSystemMsg;
|
||||||
|
override payloadSchema = SchemaData;
|
||||||
|
|
||||||
|
async _handle(params: Payload): Promise<RetData> {
|
||||||
|
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, +params.count);
|
||||||
const retData: RetData = { invited_requests: [], InvitedRequest: [], join_requests: [] };
|
const retData: RetData = { invited_requests: [], InvitedRequest: [], join_requests: [] };
|
||||||
|
|
||||||
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
||||||
@@ -43,4 +51,4 @@ export class GetGroupSystemMsg extends OneBotAction<void, RetData> {
|
|||||||
retData.invited_requests = retData.InvitedRequest;
|
retData.invited_requests = retData.InvitedRequest;
|
||||||
return retData;
|
return retData;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user