Files
NapCatQQ/packages/napcat-onebot/action/system/GetLoginInfo.ts
T
TanTan f954252a34
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
Release Tag / validate-version (push) Waiting to run
NapCatQQ source snapshot
2026-11-13 09:01:47 +08:00

25 lines
1.0 KiB
TypeScript

import { OB11User } from '@/napcat-onebot/index';
import { OB11Construct } from '@/napcat-onebot/helper/data';
import { OneBotAction } from '@/napcat-onebot/action/OneBotAction';
import { ActionName } from '@/napcat-onebot/action/router';
import { OB11UserSchema } from '../schemas';
import { Type } from '@sinclair/typebox';
import { SystemActionsExamples } from '@/napcat-onebot/action/example/SystemActionsExamples';
class GetLoginInfo extends OneBotAction<void, OB11User> {
override actionName = ActionName.GetLoginInfo;
override payloadSchema = Type.Object({});
override returnSchema = OB11UserSchema;
override actionSummary = '获取登录号信息';
override actionDescription = '获取当前登录帐号的信息';
override actionTags = ['系统接口'];
override payloadExample = SystemActionsExamples.GetLoginInfo.payload;
override returnExample = SystemActionsExamples.GetLoginInfo.response;
async _handle () {
return OB11Construct.selfInfo(this.core.selfInfo);
}
}
export default GetLoginInfo;