mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-02-04 22:51:13 +00:00
Introduced explicit payloadSchema and returnSchema definitions for all OneBotAction classes using @sinclair/typebox. This improves type safety, API documentation, and validation for action payloads and return values. Also refactored method signatures and types for consistency across the codebase.
14 lines
376 B
TypeScript
14 lines
376 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.Void();
|
|
override returnSchema = Type.Void();
|
|
|
|
async _handle () {
|
|
process.exit(0);
|
|
}
|
|
}
|