UNPKG

koishi-plugin-yutang-ohayo

Version:

抄袭的早安插件,数据存储到数据库的早安

41 lines (40 loc) 1.2 kB
import { Context, Logger, Schema } from 'koishi'; export declare const name = "ohayo"; export declare const logger: Logger; declare module 'koishi' { interface Tables { ohayoUserState: { id: number; uid: number; userId: string; createdAt: Date; updatedAt: Date; username: string; channelName: string; channelId: string; hasOhayo: boolean; ohayoTime: Date; hasOyasumi: boolean; oyasumiTime: Date; totleAwakeSeconds: number; }; } } export interface OhayoUserState { hasOhayo: boolean; ohayoTime: Date; hasOyasumi: boolean; oyasumiTime: Date; } export declare const Config: Schema<Schemastery.ObjectS<{}>, Schemastery.ObjectT<{}>>; export declare class Tools { static getRandomInt(min: number, max: number): number; static roll<T>(args: T[]): T; static deleteSelfAdd(content: string, id: string): string; } export declare class DailyTask { private static clearIntervalId; static init(): void; static stop(): void; } export declare function apply(ctx: Context, config: object): void;