This commit is contained in:
手瓜一十雪 2024-08-09 16:30:54 +08:00
parent 1d3ac0c9b3
commit 24a166cb94
6 changed files with 6 additions and 11 deletions

View File

@ -1,9 +1,7 @@
import { DeviceList } from '@/onebot11/main';
import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
import { checkFileReceived, uri2local } from '@/common/utils/file';
import { NTQQSystemApi } from '@/core';
import fs from 'fs';
const SchemaData = {

View File

@ -2,7 +2,7 @@ import BaseAction from '../BaseAction';
import { ActionName } from '../types';
import fs from 'fs';
import { join as joinPath } from 'node:path';
import { calculateFileMD5, getTempDir, httpDownload } from '@/common/utils/file';
import { calculateFileMD5, httpDownload } from '@/common/utils/file';
import { randomUUID } from 'crypto';
import { FromSchema, JSONSchema } from 'json-schema-to-ts';
interface FileResponse {

View File

@ -1,7 +1,5 @@
import BaseAction from '../BaseAction';
import { getGroup } from '@/core/data';
import BaseAction from '../BaseAction';;
import { ActionName } from '../types';
import { SendMsgElementConstructor } from '@/core/entities/constructor';
import { ChatType, Peer, SendFileElement } from '@/core/entities';
import fs from 'fs';
import { SendMsg, sendMsg } from '@/onebot/action/msg/SendMsg';

View File

@ -1,4 +1,3 @@
import { getGroup } from '@/core/data';
import { OB11Group } from '../../types';
import { OB11Constructor } from '../../helper/constructor';
import BaseAction from '../BaseAction';

View File

@ -36,7 +36,7 @@ class GetGroupMemberInfo extends BaseAction<Payload, OB11GroupMember> {
this.CoreContext.context.logger.logDebug('群成员详细信息结果', info);
Object.assign(member, info);
} catch (e) {
this.CoreContext.context.loggerlogDebug('获取群成员详细信息失败, 只能返回基础信息', e);
this.CoreContext.context.logger.logDebug('获取群成员详细信息失败, 只能返回基础信息', e);
}
const date = Math.round(Date.now() / 1000);
const retMember = OB11Constructor.groupMember(payload.group_id.toString(), member);
@ -57,7 +57,7 @@ class GetGroupMemberInfo extends BaseAction<Payload, OB11GroupMember> {
}
}
} else {
const LastestMsgList = await NTQQGroupApi.getLastestMsg(payload.group_id.toString(), [payload.user_id.toString()]);
const LastestMsgList = await NTQQGroupApi.getLatestMsg(payload.group_id.toString(), [payload.user_id.toString()]);
if (LastestMsgList?.msgList?.length && LastestMsgList?.msgList?.length > 0) {
const last_send_time = LastestMsgList.msgList[0].msgTime;
if (last_send_time && last_send_time != '0' && last_send_time != '') {

View File

@ -1,12 +1,12 @@
import BaseAction from '../BaseAction';
import { OB11Version } from '../../types';
import { ActionName } from '../types';
import { version } from '@/onebot11/version';
import { version } from '@/onebot/version';
export default class GetVersionInfo extends BaseAction<any, OB11Version> {
actionName = ActionName.GetVersionInfo;
protected async _handle(payload: any): Promise<OB11Version> {
protected async _handle(payload: any): Promise<any> {
return {
app_name: 'NapCat.Onebot',
protocol_version: 'v11',