mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
fix: payload basic check in GetPacketStatusDepends
This commit is contained in:
parent
d93a280ab3
commit
cda5e784f6
@ -5,16 +5,14 @@ import { ActionName, BaseCheckResult } from '../types';
|
|||||||
export abstract class GetPacketStatusDepends<PT, RT> extends BaseAction<PT, RT> {
|
export abstract class GetPacketStatusDepends<PT, RT> extends BaseAction<PT, RT> {
|
||||||
actionName = ActionName.GetPacketStatus;
|
actionName = ActionName.GetPacketStatus;
|
||||||
|
|
||||||
protected async check(): Promise<BaseCheckResult>{
|
protected async check(payload: PT): Promise<BaseCheckResult>{
|
||||||
if (!this.core.apis.PacketApi.available) {
|
if (!this.core.apis.PacketApi.available) {
|
||||||
return {
|
return {
|
||||||
valid: false,
|
valid: false,
|
||||||
message: "packetServer不可用,请参照文档 https://napneko.github.io/config/advanced 检查packetServer状态或进行配置!",
|
message: "packetServer不可用,请参照文档 https://napneko.github.io/config/advanced 检查packetServer状态或进行配置!",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return {
|
return await super.check(payload);
|
||||||
valid: true,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user