mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-05 15:11:15 +00:00
Replace Type.Void() payload/return schemas with Type.Object({}) in several OneBot action extensions to represent empty object schemas and avoid void-type validation issues. Updated files: BotExit (payload & return), GetClientkey, GetFriendWithCategory, GetGroupAddRequest, GetRkey, GetRobotUinRange, GetUnidirectionalFriendList.
18 lines
534 B
TypeScript
18 lines
534 B
TypeScript
import { ActionName } from '@/napcat-onebot/action/router';
|
|
import { OneBotAction } from '../OneBotAction';
|
|
import { Type } from '@sinclair/typebox';
|
|
|
|
export class BotExit extends OneBotAction<void, void> {
|
|
override actionName = ActionName.Exit;
|
|
override payloadSchema = Type.Object({});
|
|
override returnSchema = Type.Object({});
|
|
override actionSummary = '退出登录';
|
|
override actionTags = ['系统扩展'];
|
|
override payloadExample = {};
|
|
override returnExample = null;
|
|
|
|
async _handle () {
|
|
process.exit(0);
|
|
}
|
|
}
|