diff --git a/src/onebot/action/extends/GetFriendWithCategory.ts b/src/onebot/action/extends/GetFriendWithCategory.ts index 04373d0c..6374f1cb 100644 --- a/src/onebot/action/extends/GetFriendWithCategory.ts +++ b/src/onebot/action/extends/GetFriendWithCategory.ts @@ -6,14 +6,9 @@ export class GetFriendWithCategory extends BaseAction { actionName = ActionName.GetFriendsWithCategory; async _handle(payload: void) { - if (this.CoreContext.context.basicInfoWrapper.requireMinNTQQBuild('26702')) { - //全新逻辑 - return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({ - ...category, - buddyList: OB11Constructor.friendsV2(category.buddyList), - })); - } else { - throw new Error('this ntqq version not support, must be 26702 or later'); - } + return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({ + ...category, + buddyList: OB11Constructor.friendsV2(category.buddyList), + })); } } diff --git a/src/onebot/action/extends/GetRobotUinRange.ts b/src/onebot/action/extends/GetRobotUinRange.ts index 21c0bce9..0466f3cf 100644 --- a/src/onebot/action/extends/GetRobotUinRange.ts +++ b/src/onebot/action/extends/GetRobotUinRange.ts @@ -5,7 +5,6 @@ export class GetRobotUinRange extends BaseAction> { actionName = ActionName.GetRobotUinRange; async _handle(payload: void) { - // console.log(await NTQQUserApi.getRobotUinRange()); const NTQQUserApi = this.CoreContext.apis.UserApi; return await NTQQUserApi.getRobotUinRange(); } diff --git a/src/onebot/action/group/DelEssenceMsg.ts b/src/onebot/action/group/DelEssenceMsg.ts index 733138e5..001f178a 100644 --- a/src/onebot/action/group/DelEssenceMsg.ts +++ b/src/onebot/action/group/DelEssenceMsg.ts @@ -20,9 +20,7 @@ export default class DelEssenceMsg extends BaseAction { async _handle(payload: Payload): Promise { const NTQQGroupApi = this.CoreContext.apis.GroupApi; const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString())); - if (!msg) { - throw new Error('msg not found'); - } + if (!msg) throw new Error('msg not found'); return await NTQQGroupApi.removeGroupEssence( msg.Peer.peerUid, msg.MsgId,