style: lint

This commit is contained in:
手瓜一十雪
2024-10-27 10:02:42 +08:00
parent f12cf59137
commit 3a244f5804
5 changed files with 17 additions and 17 deletions

View File

@@ -118,7 +118,7 @@ export class PacketMsgConverter {
if (!this.isValidElementType(element.elementType)) return null; if (!this.isValidElementType(element.elementType)) return null;
return this.rawToPacketMsgConverters[element.elementType](element); return this.rawToPacketMsgConverters[element.elementType](element);
}).filter((e) => e !== null) }).filter((e) => e !== null)
} };
} }
private rawToPacketMsgConverters: ElementToPacketMsgConverters = { private rawToPacketMsgConverters: ElementToPacketMsgConverters = {

View File

@@ -16,11 +16,11 @@ export class GoCQHTTPGetGroupAtAllRemain extends BaseAction<Payload, any> {
payloadSchema = SchemaData; payloadSchema = SchemaData;
async _handle(payload: Payload) { async _handle(payload: Payload) {
let ret = await this.core.apis.GroupApi.getGroupRemainAtTimes(payload.group_id.toString()); const ret = await this.core.apis.GroupApi.getGroupRemainAtTimes(payload.group_id.toString());
if (!ret.atInfo || ret.result !== 0) { if (!ret.atInfo || ret.result !== 0) {
throw new Error('atInfo not found'); throw new Error('atInfo not found');
} }
let data = { const data = {
can_at_all: ret.atInfo.canAtAll, can_at_all: ret.atInfo.canAtAll,
remain_at_all_count_for_group: ret.atInfo.RemainAtAllCountForGroup, remain_at_all_count_for_group: ret.atInfo.RemainAtAllCountForGroup,
remain_at_all_count_for_uin: ret.atInfo.RemainAtAllCountForUin remain_at_all_count_for_uin: ret.atInfo.RemainAtAllCountForUin

View File

@@ -18,7 +18,7 @@ export class GoCQHTTPDeleteFriend extends BaseAction<Payload, any> {
payloadSchema = SchemaData; payloadSchema = SchemaData;
async _handle(payload: Payload) { async _handle(payload: Payload) {
let uid = await this.core.apis.UserApi.getUidByUinV2(payload.friend_id.toString()); const uid = await this.core.apis.UserApi.getUidByUinV2(payload.friend_id.toString());
if (!uid) { if (!uid) {
return { return {
@@ -26,7 +26,7 @@ export class GoCQHTTPDeleteFriend extends BaseAction<Payload, any> {
message: '好友不存在', message: '好友不存在',
}; };
} }
let isBuddy = await this.core.apis.FriendApi.isBuddy(uid); const isBuddy = await this.core.apis.FriendApi.isBuddy(uid);
if (!isBuddy) { if (!isBuddy) {
return { return {
valid: false, valid: false,