koishi-plugin-checkin-custom
Version:
一个高度可配置的、支持多类型打卡和独立排行榜的 Koishi 插件。
44 lines (43 loc) • 1.13 kB
TypeScript
import { Context, Schema } from 'koishi';
import type Puppeteer from 'koishi-plugin-puppeteer';
export declare const name = "checkin-custom";
export declare const inject: {
required: string[];
};
export interface CheckinCommandConfig {
commandName: string;
successMessage: string;
alreadyCheckedMessage: string;
checkinTitle: string;
backgroundImage: string;
backgroundSize: 'cover' | 'contain';
backgroundBlur: number;
themeColor: string;
}
export interface RankCommandConfig {
commandName: string;
title: string;
includedTypes: string[];
}
export interface Config {
checkinCommands: CheckinCommandConfig[];
rankCommands: RankCommandConfig[];
debug: boolean;
}
export declare const Config: Schema<Config>;
declare module 'koishi' {
interface Context {
puppeteer: Puppeteer;
}
interface Tables {
'checkin-custom-record': CheckinRecord;
}
}
export interface CheckinRecord {
id: number;
userId: string;
platform: string;
checkinType: string;
date: Date;
}
export declare function apply(ctx: Context, config: Config): void;