Skip to content

Commit

Permalink
style: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Dec 17, 2024
1 parent 892262e commit 44ff92a
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 24 deletions.
2 changes: 1 addition & 1 deletion src/core/apis/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export class NTQQGroupApi {
}

async fetchGroupDetail(groupCode: string) {
let [, detailInfo] = await this.core.eventWrapper.callNormalEventV2(
const [, detailInfo] = await this.core.eventWrapper.callNormalEventV2(
'NodeIKernelGroupService/getGroupDetailInfo',
'NodeIKernelGroupListener/onGroupDetailInfoChange',
[groupCode, GroupInfoSource.KDATACARD],
Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/group/GetGroupInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class GetGroupInfo extends OneBotAction<Payload, OB11Group> {
group_name: data.groupName,
member_count: data.memberNum,
max_member_count: data.maxMemberNum,
}
};
}
return OB11Construct.group(group);
}
Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/group/SendGroupMsg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ContextMode, SendMsgBase} from '@/onebot/action/msg/SendMsg';
import { ContextMode, SendMsgBase } from '@/onebot/action/msg/SendMsg';
import { ActionName, BaseCheckResult } from '@/onebot/action/router';
import { OB11PostSendMsg } from '@/onebot/types';

Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/msg/SendPrivateMsg.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {ContextMode, SendMsgBase} from './SendMsg';
import { ContextMode, SendMsgBase } from './SendMsg';
import { ActionName, BaseCheckResult } from '@/onebot/action/router';
import { OB11PostSendMsg } from '@/onebot/types';

Expand Down
2 changes: 1 addition & 1 deletion src/onebot/action/system/CanSendImage.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ActionName } from '@/onebot/action/router';
import CanSendRecord, {CanSend} from './CanSendRecord';
import CanSendRecord, { CanSend } from './CanSendRecord';

interface ReturnType {
yes: boolean;
Expand Down
36 changes: 18 additions & 18 deletions src/onebot/api/msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -895,16 +895,16 @@ export class OneBotMsgApi {
const calculateTotalSize = async (elements: SendMessageElement[]): Promise<number> => {
const sizePromises = elements.map(async element => {
switch (element.elementType) {
case ElementType.PTT:
return (await fsPromise.stat(element.pttElement.filePath)).size;
case ElementType.FILE:
return (await fsPromise.stat(element.fileElement.filePath)).size;
case ElementType.VIDEO:
return (await fsPromise.stat(element.videoElement.filePath)).size;
case ElementType.PIC:
return (await fsPromise.stat(element.picElement.sourcePath)).size;
default:
return 0;
case ElementType.PTT:
return (await fsPromise.stat(element.pttElement.filePath)).size;
case ElementType.FILE:
return (await fsPromise.stat(element.fileElement.filePath)).size;
case ElementType.VIDEO:
return (await fsPromise.stat(element.videoElement.filePath)).size;
case ElementType.PIC:
return (await fsPromise.stat(element.picElement.sourcePath)).size;
default:
return 0;
}
});
const sizes = await Promise.all(sizePromises);
Expand Down Expand Up @@ -970,14 +970,14 @@ export class OneBotMsgApi {
}
groupChangDecreseType2String(type: number): GroupDecreaseSubType {
switch (type) {
case 130:
return 'leave';
case 131:
return 'kick';
case 3:
return 'kick_me';
default:
return 'kick';
case 130:
return 'leave';
case 131:
return 'kick';
case 3:
return 'kick_me';
default:
return 'kick';
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/onebot/api/quick-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export class OneBotQuickActionApi {
}

async handleGroupRequest(request: OB11GroupRequestEvent, quickAction: QuickActionGroupRequest) {
let noify = await this.findNotify(request.flag);
const noify = await this.findNotify(request.flag);

if (!isNull(quickAction.approve) && noify) {
this.core.apis.GroupApi.handleGroupRequest(
Expand Down

0 comments on commit 44ff92a

Please sign in to comment.