mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
style: lint
This commit is contained in:
@@ -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 = {
|
||||||
|
@@ -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
|
||||||
|
@@ -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,
|
||||||
|
Reference in New Issue
Block a user