Compare commits

...
2 Commits
Author SHA1 Message Date
手瓜一十雪 09583e5de5 fuck javascript
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
2024-12-16 22:09:37 +08:00
Mlikiowa 38b0b7cd00 release: v4.2.34 2024-12-16 13:17:43 +00:00
6 changed files with 7 additions and 24 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "4.2.33",
"version": "4.2.34",
"icon": "./logo.png",
"authors": [
{
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.2.33",
"version": "4.2.34",
"scripts": {
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
+1 -1
View File
@@ -1 +1 @@
export const napCatVersion = '4.2.33';
export const napCatVersion = '4.2.34';
+1 -15
View File
@@ -1,19 +1,5 @@
import type { OneBotFriendApi } from '@/onebot/api/friend';
import type { OneBotUserApi } from '@/onebot/api/user';
import type { OneBotGroupApi } from '@/onebot/api/group';
import type { OneBotMsgApi } from '@/onebot/api/msg';
import type { OneBotQuickActionApi } from '@/onebot/api/quick-action';
export * from './friend';
export * from './group';
export * from './user';
export * from './msg';
export * from './quick-action';
export interface StableOneBotApiWrapper {
FriendApi: OneBotFriendApi;
UserApi: OneBotUserApi;
GroupApi: OneBotGroupApi;
MsgApi: OneBotMsgApi;
QuickActionApi: OneBotQuickActionApi,
}
export * from './quick-action';
+2 -3
View File
@@ -31,7 +31,6 @@ import {
OneBotMsgApi,
OneBotQuickActionApi,
OneBotUserApi,
StableOneBotApiWrapper,
} from '@/onebot/api';
import { ActionMap, createActionMap } from '@/onebot/action';
import { WebUiDataRuntime } from '@/webui/src/helper/Data';
@@ -55,7 +54,7 @@ export class NapCatOneBot11Adapter {
readonly context: InstanceContext;
configLoader: OB11ConfigLoader;
public readonly apis: StableOneBotApiWrapper;
public readonly apis;
networkManager: OB11NetworkManager;
actions: ActionMap;
private readonly bootTime = Date.now() / 1000;
@@ -72,7 +71,7 @@ export class NapCatOneBot11Adapter {
UserApi: new OneBotUserApi(this, core),
FriendApi: new OneBotFriendApi(this, core),
MsgApi: new OneBotMsgApi(this, core),
QuickActionApi: new OneBotQuickActionApi(this, core),
QuickActionApi: new OneBotQuickActionApi(this, core)
} as const;
this.actions = createActionMap(this, core);
this.networkManager = new OB11NetworkManager();
+1 -3
View File
@@ -30,7 +30,6 @@ export class OB11ActiveHttpAdapter implements IOB11NetworkAdapter {
async emitEventAsync<T extends OB11EmitEventContent>(event: T) {
if (!this.isEnable) return;
const headers: Record<string, string> = {
'Content-Type': 'application/json',
'x-self-id': this.core.selfInfo.uin,
@@ -46,10 +45,9 @@ export class OB11ActiveHttpAdapter implements IOB11NetworkAdapter {
const data = await RequestUtil.HttpGetText(this.config.url, 'POST', msgStr, headers);
const resJson: QuickAction = data ? JSON.parse(data) : {};
if (!this.obContext.apis.QuickActionApi.handleQuickOperation) {
if (!this.obContext.apis || !this.obContext.apis.QuickActionApi.handleQuickOperation) {
throw new Error('apis.QuickActionApi.handleQuickOperation 异常');
}
await this.obContext.apis.QuickActionApi.handleQuickOperation(event as QuickActionEvent, resJson);
}