3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 22:21:51 +00:00
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-12 01:30:40 +00:00 committed by GitHub
parent 6aab399173
commit 8590263c35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ import {
globalPlugin, globalPlugin,
guildPlugin, guildPlugin,
} from "knub"; } from "knub";
import { ConfigParserFn, PluginOptions } from "knub/dist/config/configTypes"; import { PluginOptions } from "knub/dist/config/configTypes";
import { Awaitable } from "knub/dist/utils"; import { Awaitable } from "knub/dist/utils";
import { getPluginConfigParser } from "../pluginUtils"; import { getPluginConfigParser } from "../pluginUtils";
import { TMarkdown } from "../types"; import { TMarkdown } from "../types";
@ -30,7 +30,7 @@ export interface ZeppelinGuildPluginBlueprint<TPluginData extends GuildPluginDat
legacy?: boolean | string; legacy?: boolean | string;
}; };
configParser: ( configParser?: (
options: TPluginData["_pluginType"]["config"], options: TPluginData["_pluginType"]["config"],
strict?: boolean, strict?: boolean,
) => Awaitable<PluginOptions<TPluginData["_pluginType"]>>; ) => Awaitable<PluginOptions<TPluginData["_pluginType"]>>;
@ -67,7 +67,7 @@ export function zeppelinGuildPlugin(...args) {
export interface ZeppelinGlobalPluginBlueprint<TPluginType extends BasePluginType = BasePluginType> export interface ZeppelinGlobalPluginBlueprint<TPluginType extends BasePluginType = BasePluginType>
extends GlobalPluginBlueprint<GlobalPluginData<TPluginType>> { extends GlobalPluginBlueprint<GlobalPluginData<TPluginType>> {
configSchema: t.TypeC<any>; configSchema: t.TypeC<any>;
configParser: (options: TPluginType["config"], strict?: boolean) => Awaitable<PluginOptions<TPluginType>>; configParser?: (options: TPluginType["config"], strict?: boolean) => Awaitable<PluginOptions<TPluginType>>;
} }
export function zeppelinGlobalPlugin<TBlueprint extends ZeppelinGlobalPluginBlueprint>( export function zeppelinGlobalPlugin<TBlueprint extends ZeppelinGlobalPluginBlueprint>(