mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
10 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
ed9cd2fe38 | ||
![]() |
e287906a9d | ||
![]() |
8bae789020 | ||
![]() |
ce57b7b725 | ||
![]() |
1d9872195d | ||
![]() |
98d1f8e29f | ||
![]() |
221b3fb730 | ||
![]() |
90a834495a | ||
![]() |
8bfd102232 | ||
![]() |
65e784f169 |
8
.github/workflows/release.yml
vendored
8
.github/workflows/release.yml
vendored
@@ -127,10 +127,6 @@ jobs:
|
||||
zip -q -r NapCat.Framework.Windows.Once.zip *
|
||||
cd ..
|
||||
mv ./NapCat.Framework.Windows.Once/NapCat.Framework.Windows.Once.zip ./
|
||||
mv ./external/packet/napcat.packet.arm64 ./
|
||||
mv ./external/packet/napcat.packet.exe ./
|
||||
mv ./external/packet/napcat.packet.linux ./
|
||||
mv ./external/packet/napcat.packet.production.py ./
|
||||
- name: Extract version from tag
|
||||
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
|
||||
|
||||
@@ -147,8 +143,4 @@ jobs:
|
||||
NapCat.Framework.zip
|
||||
NapCat.Shell.zip
|
||||
NapCat.Framework.Windows.Once.zip
|
||||
napcat.packet.arm64
|
||||
napcat.packet.exe
|
||||
napcat.packet.linux
|
||||
napcat.packet.production.py
|
||||
draft: true
|
||||
|
@@ -30,6 +30,8 @@ NapCatQQ (aka 猫猫框架) 是现代化的基于 NTQQ 的 Bot 协议端实现
|
||||
|
||||
[Cloudflare.Pages](https://napneko.pages.dev/)
|
||||
|
||||
[Server.China](https://napneko.com/)
|
||||
|
||||
[Server.Other](https://napcat.cyou/)
|
||||
|
||||
[Github.IO](https://napneko.github.io/)
|
||||
|
BIN
external/packet/napcat.packet.arm64
vendored
BIN
external/packet/napcat.packet.arm64
vendored
Binary file not shown.
BIN
external/packet/napcat.packet.exe
vendored
BIN
external/packet/napcat.packet.exe
vendored
Binary file not shown.
BIN
external/packet/napcat.packet.linux
vendored
BIN
external/packet/napcat.packet.linux
vendored
Binary file not shown.
102
external/packet/napcat.packet.production.py
vendored
102
external/packet/napcat.packet.production.py
vendored
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
"name": "NapCatQQ",
|
||||
"slug": "NapCat.Framework",
|
||||
"description": "高性能的 OneBot 11 协议实现",
|
||||
"version": "3.6.9",
|
||||
"version": "3.6.12",
|
||||
"icon": "./logo.png",
|
||||
"authors": [
|
||||
{
|
||||
|
@@ -2,7 +2,7 @@
|
||||
"name": "napcat",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "3.6.9",
|
||||
"version": "3.6.12",
|
||||
"scripts": {
|
||||
"build:framework": "vite build --mode framework",
|
||||
"build:shell": "vite build --mode shell",
|
||||
|
@@ -1 +1 @@
|
||||
export const napCatVersion = '3.6.9';
|
||||
export const napCatVersion = '3.6.12';
|
||||
|
26
src/core/external/offset.json
vendored
26
src/core/external/offset.json
vendored
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"6.9.56-28418-arm64": {
|
||||
"send": "4471360",
|
||||
"recv": "4473BCC"
|
||||
},
|
||||
"3.2.12-28418-x64": {
|
||||
"recv": "A0723E0",
|
||||
"send": "A06EAE0"
|
||||
@@ -11,6 +7,14 @@
|
||||
"recv": "37A9004",
|
||||
"send": "37A4BD0"
|
||||
},
|
||||
"6.9.56-28418-x64": {
|
||||
"send": "4471360",
|
||||
"recv": "4473BCC"
|
||||
},
|
||||
"6.9.56-28418-arm64": {
|
||||
"send": "3FBDBF8",
|
||||
"recv": "3FC0410"
|
||||
},
|
||||
"9.9.15-28498-x64": {
|
||||
"recv": "37A9004",
|
||||
"send": "37A4BD0"
|
||||
@@ -39,10 +43,14 @@
|
||||
"send": "6E91318",
|
||||
"recv": "6E94B50"
|
||||
},
|
||||
"6.9.58-28971-arm64": {
|
||||
"6.9.58-28971-x64": {
|
||||
"send": "449ACA0",
|
||||
"recv": "449D50C"
|
||||
},
|
||||
"6.9.58-28971-arm64": {
|
||||
"send": "3FE0DB0",
|
||||
"recv": "3FE35C8"
|
||||
},
|
||||
"9.9.16-29271-x64": {
|
||||
"send": "3833510",
|
||||
"recv": "3837944"
|
||||
@@ -66,5 +74,13 @@
|
||||
"3.2.13-29456-arm64": {
|
||||
"send": "6ECA130",
|
||||
"recv": "6ECD968"
|
||||
},
|
||||
"6.9.59-29456-x64": {
|
||||
"send": "44C57A0",
|
||||
"recv": "44C800C"
|
||||
},
|
||||
"6.9.59-29456-arm64": {
|
||||
"send": "4005FE8",
|
||||
"recv": "4008800"
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { ChatType, RawMessage } from '@/core/entities';
|
||||
import { ChatType, KickedOffLineInfo, RawMessage } from '@/core/entities';
|
||||
import { CommonFileInfo } from '@/core';
|
||||
|
||||
export interface OnRichMediaDownloadCompleteParams {
|
||||
@@ -212,7 +212,7 @@ export class NodeIKernelMsgListener {
|
||||
|
||||
}
|
||||
|
||||
onKickedOffLine(kickedInfo: unknown) {
|
||||
onKickedOffLine(kickedInfo: KickedOffLineInfo) {
|
||||
|
||||
}
|
||||
|
||||
|
BIN
src/native/packet/MoeHoo.darwin.arm64.node
Normal file
BIN
src/native/packet/MoeHoo.darwin.arm64.node
Normal file
Binary file not shown.
@@ -2,12 +2,14 @@ import { ChatType, Peer } from '@/core/entities';
|
||||
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { MessageUnique } from '@/common/message-unique';
|
||||
|
||||
const SchemaData = {
|
||||
type: 'object',
|
||||
properties: {
|
||||
user_id: { type: ['number', 'string'] },
|
||||
group_id: { type: ['number', 'string'] },
|
||||
message_id: { type: ['number', 'string'] },
|
||||
},
|
||||
} as const satisfies JSONSchema;
|
||||
|
||||
@@ -15,6 +17,16 @@ type PlayloadType = FromSchema<typeof SchemaData>;
|
||||
|
||||
class MarkMsgAsRead extends BaseAction<PlayloadType, null> {
|
||||
async getPeer(payload: PlayloadType): Promise<Peer> {
|
||||
if (payload.message_id) {
|
||||
let s_peer = MessageUnique.getMsgIdAndPeerByShortId(+payload.message_id)?.Peer;
|
||||
if (s_peer) {
|
||||
return s_peer;
|
||||
}
|
||||
let l_peer = MessageUnique.getPeerByMsgId(payload.message_id.toString())?.Peer;
|
||||
if (l_peer) {
|
||||
return l_peer;
|
||||
}
|
||||
}
|
||||
if (payload.user_id) {
|
||||
const peerUid = await this.core.apis.UserApi.getUidByUinV2(payload.user_id.toString());
|
||||
if (!peerUid) {
|
||||
|
16
src/onebot/event/notice/BotOfflineEvent.ts
Normal file
16
src/onebot/event/notice/BotOfflineEvent.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { OB11BaseNoticeEvent } from './OB11BaseNoticeEvent';
|
||||
import { NapCatCore } from '@/core';
|
||||
|
||||
export class BotOfflineEvent extends OB11BaseNoticeEvent {
|
||||
notice_type = 'bot_offline';
|
||||
user_id: number;
|
||||
tag: string = 'BotOfflineEvent';
|
||||
message: string = 'BotOfflineEvent';
|
||||
|
||||
public constructor(core: NapCatCore, tag: string, message: string) {
|
||||
super(core);
|
||||
this.user_id = +core.selfInfo.uin;
|
||||
this.tag = tag;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
@@ -47,6 +47,7 @@ import { LRUCache } from '@/common/lru-cache';
|
||||
import { NodeIKernelRecentContactListener } from '@/core/listeners/NodeIKernelRecentContactListener';
|
||||
import { Native } from '@/native';
|
||||
import { decodeMessage, decodeRecallGroup } from '@/core/packet/proto/old/Message';
|
||||
import { BotOfflineEvent } from './event/notice/BotOfflineEvent';
|
||||
|
||||
//OneBot实现类
|
||||
export class NapCatOneBot11Adapter {
|
||||
@@ -343,7 +344,11 @@ export class NapCatOneBot11Adapter {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
msgListener.onKickedOffLine = async (kick) => {
|
||||
let event = new BotOfflineEvent(this.core, kick.tipsTitle, kick.tipsDesc);
|
||||
this.networkManager.emitEvent(event)
|
||||
.catch(e => this.context.logger.logError.bind(this.context.logger)('处理Bot掉线失败', e));
|
||||
}
|
||||
this.context.session.getMsgService().addKernelMsgListener(
|
||||
proxiedListenerOf(msgListener, this.context.logger),
|
||||
);
|
||||
|
@@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
|
||||
SettingItem(
|
||||
'<span id="napcat-update-title">Napcat</span>',
|
||||
void 0,
|
||||
SettingButton("V3.6.9", "napcat-update-button", "secondary")
|
||||
SettingButton("V3.6.12", "napcat-update-button", "secondary")
|
||||
)
|
||||
]),
|
||||
SettingList([
|
||||
|
Reference in New Issue
Block a user