mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
chore: reorganize plugin docs
This commit is contained in:
parent
dfdc6566cf
commit
460b65d1df
53 changed files with 382 additions and 288 deletions
|
@ -1,9 +1,9 @@
|
|||
import express from "express";
|
||||
import z from "zod";
|
||||
import { guildPlugins } from "../plugins/availablePlugins.js";
|
||||
import { guildPluginInfo } from "../plugins/pluginInfo.js";
|
||||
import { indentLines } from "../utils.js";
|
||||
import { notFound } from "./responses.js";
|
||||
import { availableGuildPlugins } from "../plugins/availablePlugins.js";
|
||||
import { ZeppelinGuildPluginInfo } from "../types.js";
|
||||
|
||||
function isZodObject(schema: z.ZodTypeAny): schema is z.ZodObject<any> {
|
||||
return schema._def.typeName === "ZodObject";
|
||||
|
@ -97,34 +97,34 @@ function formatZodConfigSchema(schema: z.ZodTypeAny) {
|
|||
return "unknown";
|
||||
}
|
||||
|
||||
const availableGuildPluginsByName = availableGuildPlugins.reduce<Record<string, ZeppelinGuildPluginInfo>>((map, obj) => {
|
||||
map[obj.plugin.name] = obj;
|
||||
return map;
|
||||
}, {});
|
||||
|
||||
export function initDocs(router: express.Router) {
|
||||
const docsPluginNames = Object.keys(guildPluginInfo).filter((k) => guildPluginInfo[k].type === "stable" || guildPluginInfo[k].type === "legacy");
|
||||
const docsPlugins = availableGuildPlugins.filter(obj => obj.docs.type !== "internal");
|
||||
|
||||
router.get("/docs/plugins", (req: express.Request, res: express.Response) => {
|
||||
res.json(
|
||||
docsPluginNames.map((pluginName) => {
|
||||
const info = guildPluginInfo[pluginName]!;
|
||||
const thinInfo = { prettyName: info.prettyName, type: info.type };
|
||||
return {
|
||||
name: pluginName,
|
||||
info: thinInfo,
|
||||
};
|
||||
}),
|
||||
);
|
||||
res.json(docsPlugins.map(obj => ({
|
||||
name: obj.plugin.name,
|
||||
info: {
|
||||
prettyName: obj.docs.prettyName,
|
||||
type: obj.docs.type,
|
||||
},
|
||||
})));
|
||||
});
|
||||
|
||||
router.get("/docs/plugins/:pluginName", (req: express.Request, res: express.Response) => {
|
||||
const name = req.params.pluginName;
|
||||
const baseInfo = guildPluginInfo[name];
|
||||
if (!baseInfo) {
|
||||
const pluginInfo = availableGuildPluginsByName[req.params.pluginName];
|
||||
if (!pluginInfo) {
|
||||
return notFound(res);
|
||||
}
|
||||
|
||||
const plugin = guildPlugins.find((p) => p.name === name)!;
|
||||
const { configSchema, ...info } = baseInfo;
|
||||
const { configSchema, ...info } = pluginInfo.docs;
|
||||
const formattedConfigSchema = formatZodConfigSchema(configSchema);
|
||||
|
||||
const messageCommands = (plugin.messageCommands || []).map((cmd) => ({
|
||||
const messageCommands = (pluginInfo.plugin.messageCommands || []).map((cmd) => ({
|
||||
trigger: cmd.trigger,
|
||||
permission: cmd.permission,
|
||||
signature: cmd.signature,
|
||||
|
@ -133,10 +133,10 @@ export function initDocs(router: express.Router) {
|
|||
config: cmd.config,
|
||||
}));
|
||||
|
||||
const defaultOptions = plugin.defaultOptions || {};
|
||||
const defaultOptions = pluginInfo.plugin.defaultOptions || {};
|
||||
|
||||
res.json({
|
||||
name,
|
||||
name: pluginInfo.plugin.name,
|
||||
info,
|
||||
configSchema: formattedConfigSchema,
|
||||
defaultOptions,
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
import { z } from "zod";
|
||||
import { zodToJsonSchema } from "zod-to-json-schema";
|
||||
import { guildPluginInfo } from "./plugins/pluginInfo.js";
|
||||
import { zZeppelinGuildConfig } from "./types.js";
|
||||
import { availableGuildPlugins } from "./plugins/availablePlugins.js";
|
||||
|
||||
const pluginSchemaMap = Object.entries(guildPluginInfo).reduce((map, [pluginName, pluginInfo]) => {
|
||||
if (pluginInfo.configSchema) {
|
||||
map[pluginName] = pluginInfo.configSchema;
|
||||
}
|
||||
const pluginSchemaMap = availableGuildPlugins.reduce((map, pluginInfo) => {
|
||||
map[pluginInfo.plugin.name] = pluginInfo.docs.configSchema;
|
||||
return map;
|
||||
}, {});
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ import { runUpcomingScheduledPostsLoop } from "./data/loops/upcomingScheduledPos
|
|||
import { consumeQueryStats } from "./data/queryLogger.js";
|
||||
import { env } from "./env.js";
|
||||
import { logger } from "./logger.js";
|
||||
import { baseGuildPlugins, globalPlugins, guildPlugins } from "./plugins/availablePlugins.js";
|
||||
import { availableGuildPlugins, availableGlobalPlugins } from "./plugins/availablePlugins.js";
|
||||
import { setProfiler } from "./profiler.js";
|
||||
import { logRateLimit } from "./rateLimitStats.js";
|
||||
import { startUptimeCounter } from "./uptime.js";
|
||||
|
@ -245,6 +245,7 @@ connect().then(async () => {
|
|||
],
|
||||
});
|
||||
// FIXME: TS doesn't see Client as a child of EventEmitter for some reason
|
||||
// If you're here because of an error from TS 5.5.2, see https://github.com/discordjs/discord.js/issues/10358
|
||||
(client as unknown as EventEmitter).setMaxListeners(200);
|
||||
|
||||
const safe429DecayInterval = 5 * SECONDS;
|
||||
|
@ -274,8 +275,8 @@ connect().then(async () => {
|
|||
const guildConfigs = new Configs();
|
||||
|
||||
const bot = new Knub(client, {
|
||||
guildPlugins,
|
||||
globalPlugins,
|
||||
guildPlugins: availableGuildPlugins.map(obj => obj.plugin),
|
||||
globalPlugins: availableGlobalPlugins.map(obj => obj.plugin),
|
||||
|
||||
options: {
|
||||
canLoadGuild(guildId): Promise<boolean> {
|
||||
|
@ -284,7 +285,7 @@ connect().then(async () => {
|
|||
|
||||
/**
|
||||
* Plugins are enabled if they...
|
||||
* - are base plugins, i.e. always enabled, or
|
||||
* - are marked to be autoloaded, or
|
||||
* - are explicitly enabled in the guild config
|
||||
* Dependencies are also automatically loaded by Knub.
|
||||
*/
|
||||
|
@ -294,10 +295,10 @@ connect().then(async () => {
|
|||
}
|
||||
|
||||
const configuredPlugins = ctx.config.plugins;
|
||||
const basePluginNames = baseGuildPlugins.map((p) => p.name);
|
||||
const autoloadPluginNames = availableGuildPlugins.filter(obj => obj.autoload).map(obj => obj.plugin.name);
|
||||
|
||||
return Array.from(plugins.keys()).filter((pluginName) => {
|
||||
if (basePluginNames.includes(pluginName)) return true;
|
||||
if (autoloadPluginNames.includes(pluginName)) return true;
|
||||
return configuredPlugins[pluginName] && (configuredPlugins[pluginName] as any).enabled !== false;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zAutoDeleteConfig } from "./types.js";
|
||||
|
||||
export const autoDeletePluginInfo: ZeppelinPluginInfo = {
|
||||
export const autoDeletePluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
configSchema: zAutoDeleteConfig,
|
||||
|
||||
prettyName: "Auto-delete",
|
||||
description: "Allows Zeppelin to auto-delete messages from a channel after a delay",
|
||||
configurationGuide: "Maximum deletion delay is currently 5 minutes",
|
||||
configSchema: zAutoDeleteConfig,
|
||||
};
|
|
@ -6,6 +6,7 @@ import { DisableAutoReactionsCmd } from "./commands/DisableAutoReactionsCmd.js";
|
|||
import { NewAutoReactionsCmd } from "./commands/NewAutoReactionsCmd.js";
|
||||
import { AddReactionsEvt } from "./events/AddReactionsEvt.js";
|
||||
import { AutoReactionsPluginType, zAutoReactionsConfig } from "./types.js";
|
||||
import { autoReactionsPluginDocs } from "./docs.js";
|
||||
|
||||
const defaultOptions: PluginOptions<AutoReactionsPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zAutoReactionsConfig } from "./types.js";
|
||||
|
||||
export const autoReactionsInfo: ZeppelinPluginInfo = {
|
||||
export const autoReactionsPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
configSchema: zAutoReactionsConfig,
|
||||
|
||||
prettyName: "Auto-reactions",
|
||||
description: trimPluginDescription(`
|
||||
Allows setting up automatic reactions to all new messages on a channel
|
||||
`),
|
||||
configSchema: zAutoReactionsConfig,
|
||||
};
|
|
@ -32,6 +32,7 @@ import { clearOldRecentNicknameChanges } from "./functions/clearOldNicknameChang
|
|||
import { clearOldRecentActions } from "./functions/clearOldRecentActions.js";
|
||||
import { clearOldRecentSpam } from "./functions/clearOldRecentSpam.js";
|
||||
import { AutomodPluginType, zAutomodConfig } from "./types.js";
|
||||
import { automodPluginDocs } from "./docs.js";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zAutomodConfig } from "./types.js";
|
||||
|
||||
export const automodPluginInfo: ZeppelinPluginInfo = {
|
||||
export const automodPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Automod",
|
||||
configSchema: zAutomodConfig,
|
||||
|
||||
prettyName: "Automod",
|
||||
description: trimPluginDescription(`
|
||||
Allows specifying automated actions in response to triggers. Example use cases include word filtering and spam prevention.
|
||||
`),
|
13
backend/src/plugins/BotControl/docs.ts
Normal file
13
backend/src/plugins/BotControl/docs.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zBotControlConfig } from "./types.js";
|
||||
|
||||
export const botControlPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
configSchema: zBotControlConfig,
|
||||
|
||||
prettyName: "Bot control",
|
||||
description: trimPluginDescription(`
|
||||
Contains commands to manage allowed servers
|
||||
`),
|
||||
};
|
|
@ -14,6 +14,7 @@ import { getRecentCasesByMod } from "./functions/getRecentCasesByMod.js";
|
|||
import { getTotalCasesByMod } from "./functions/getTotalCasesByMod.js";
|
||||
import { postCaseToCaseLogChannel } from "./functions/postToCaseLogChannel.js";
|
||||
import { CasesPluginType, zCasesConfig } from "./types.js";
|
||||
import { casesPluginDocs } from "./docs.js";
|
||||
|
||||
// The `any` cast here is to prevent TypeScript from locking up from the circular dependency
|
||||
function getLogsPlugin(): Promise<any> {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zCasesConfig } from "./types.js";
|
||||
|
||||
export const casesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const casesPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Cases",
|
||||
configSchema: zCasesConfig,
|
||||
|
||||
prettyName: "Cases",
|
||||
description: trimPluginDescription(`
|
||||
This plugin contains basic configuration for cases created by other plugins
|
||||
`),
|
|
@ -6,6 +6,7 @@ import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
|||
import { CensorPluginType, zCensorConfig } from "./types.js";
|
||||
import { onMessageCreate } from "./util/onMessageCreate.js";
|
||||
import { onMessageUpdate } from "./util/onMessageUpdate.js";
|
||||
import { censorPluginDocs } from "./docs.js";
|
||||
|
||||
const defaultOptions: PluginOptions<CensorPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zCensorConfig } from "./types.js";
|
||||
|
||||
export const censorPluginInfo: ZeppelinPluginInfo = {
|
||||
export const censorPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "legacy",
|
||||
prettyName: "Censor",
|
||||
configSchema: zCensorConfig,
|
||||
|
||||
prettyName: "Censor",
|
||||
description: trimPluginDescription(`
|
||||
Censor words, tokens, links, regex, etc.
|
||||
For more advanced filtering, check out the Automod plugin!
|
|
@ -3,6 +3,7 @@ import { GuildLogs } from "../../data/GuildLogs.js";
|
|||
import { LogsPlugin } from "../Logs/LogsPlugin.js";
|
||||
import { VoiceStateUpdateEvt } from "./events/VoiceStateUpdateEvt.js";
|
||||
import { CompanionChannelsPluginType, zCompanionChannelsConfig } from "./types.js";
|
||||
import { companionChannelsPluginDocs } from "./docs.js";
|
||||
|
||||
const defaultOptions = {
|
||||
config: {
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zCompanionChannelsConfig } from "./types.js";
|
||||
|
||||
export const companionChannelsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const companionChannelsPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Companion channels",
|
||||
configSchema: zCompanionChannelsConfig,
|
||||
|
||||
prettyName: "Companion channels",
|
||||
description: trimPluginDescription(`
|
||||
Set up 'companion channels' between text and voice channels.
|
||||
Once set up, any time a user joins one of the specified voice channels,
|
|
@ -6,6 +6,7 @@ import { UtilityPlugin } from "../Utility/UtilityPlugin.js";
|
|||
import { ContextClickedEvt } from "./events/ContextClickedEvt.js";
|
||||
import { ContextMenuPluginType, zContextMenusConfig } from "./types.js";
|
||||
import { loadAllCommands } from "./utils/loadAllCommands.js";
|
||||
import { contextMenuPluginDocs } from "./docs.js";
|
||||
|
||||
const defaultOptions: PluginOptions<ContextMenuPluginType> = {
|
||||
config: {
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zContextMenusConfig } from "./types.js";
|
||||
|
||||
export const contextMenuPluginInfo: ZeppelinPluginInfo = {
|
||||
export const contextMenuPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Context menu",
|
||||
configSchema: zContextMenusConfig,
|
||||
|
||||
prettyName: "Context menu",
|
||||
};
|
|
@ -1,11 +1,12 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zCountersConfig } from "./types.js";
|
||||
|
||||
export const countersPluginInfo: ZeppelinPluginInfo = {
|
||||
prettyName: "Counters",
|
||||
export const countersPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
configSchema: zCountersConfig,
|
||||
|
||||
prettyName: "Counters",
|
||||
description:
|
||||
"Keep track of per-user, per-channel, or global numbers and trigger specific actions based on this number",
|
||||
configurationGuide: "See <a href='/docs/setup-guides/counters'>Counters setup guide</a>",
|
||||
configSchema: zCountersConfig,
|
||||
};
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zCustomEventsConfig } from "./types.js";
|
||||
|
||||
export const customEventsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const customEventsPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Custom events",
|
||||
type: "internal",
|
||||
configSchema: zCustomEventsConfig,
|
|
@ -4,6 +4,7 @@ import z from "zod";
|
|||
import { AllowedGuilds } from "../../data/AllowedGuilds.js";
|
||||
import { Configs } from "../../data/Configs.js";
|
||||
import { env } from "../../env.js";
|
||||
import { zGuildAccessMonitorConfig } from "./types.js";
|
||||
|
||||
interface GuildAccessMonitorPluginType extends BasePluginType {
|
||||
state: {
|
||||
|
@ -24,7 +25,7 @@ async function checkGuild(pluginData: GlobalPluginData<GuildAccessMonitorPluginT
|
|||
*/
|
||||
export const GuildAccessMonitorPlugin = globalPlugin<GuildAccessMonitorPluginType>()({
|
||||
name: "guild_access_monitor",
|
||||
configParser: (input) => z.strictObject({}).parse(input),
|
||||
configParser: (input) => zGuildAccessMonitorConfig.parse(input),
|
||||
|
||||
events: [
|
||||
globalPluginEventListener<GuildAccessMonitorPluginType>()({
|
||||
|
|
14
backend/src/plugins/GuildAccessMonitor/docs.ts
Normal file
14
backend/src/plugins/GuildAccessMonitor/docs.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { z } from "zod";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zGuildAccessMonitorConfig } from "./types.js";
|
||||
|
||||
export const guildAccessMonitorPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
configSchema: zGuildAccessMonitorConfig,
|
||||
|
||||
prettyName: "Bot control",
|
||||
description: trimPluginDescription(`
|
||||
Automatically leaves servers that are not on the list of allowed servers
|
||||
`),
|
||||
};
|
3
backend/src/plugins/GuildAccessMonitor/types.ts
Normal file
3
backend/src/plugins/GuildAccessMonitor/types.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
import { z } from "zod";
|
||||
|
||||
export const zGuildAccessMonitorConfig = z.strictObject({});
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zGuildConfigReloaderPlugin } from "./types.js";
|
||||
|
||||
export const guildConfigReloaderPluginInfo: ZeppelinPluginInfo = {
|
||||
export const guildConfigReloaderPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Guild config reloader",
|
||||
type: "internal",
|
||||
configSchema: zGuildConfigReloaderPlugin,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zGuildInfoSaverConfig } from "./types.js";
|
||||
|
||||
export const guildInfoSaverPluginInfo: ZeppelinPluginInfo = {
|
||||
export const guildInfoSaverPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Guild info saver",
|
||||
type: "internal",
|
||||
configSchema: zGuildInfoSaverConfig,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zGuildMemberCacheConfig } from "./types.js";
|
||||
|
||||
export const guildMemberCachePluginInfo: ZeppelinPluginInfo = {
|
||||
export const guildMemberCachePluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Guild member cache",
|
||||
type: "internal",
|
||||
configSchema: zGuildMemberCacheConfig,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zInternalPosterConfig } from "./types.js";
|
||||
|
||||
export const internalPosterPluginInfo: ZeppelinPluginInfo = {
|
||||
export const internalPosterPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Internal poster",
|
||||
type: "internal",
|
||||
configSchema: zInternalPosterConfig,
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zLocateUserConfig } from "./types.js";
|
||||
|
||||
export const locateUserPluginInfo: ZeppelinPluginInfo = {
|
||||
export const locateUserPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Locate user",
|
||||
type: "stable",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zLogsConfig } from "./types.js";
|
||||
|
||||
export const logsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const logsPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Logs",
|
||||
configSchema: zLogsConfig,
|
||||
type: "stable",
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zMessageSaverConfig } from "./types.js";
|
||||
|
||||
export const messageSaverPluginInfo: ZeppelinPluginInfo = {
|
||||
export const messageSaverPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Message saver",
|
||||
type: "internal",
|
||||
configSchema: zMessageSaverConfig,
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zModActionsConfig } from "./types.js";
|
||||
|
||||
export const modActionsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const modActionsPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Mod actions",
|
||||
type: "stable",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zMutesConfig } from "./types.js";
|
||||
|
||||
export const mutesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const mutesPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Mutes",
|
||||
type: "stable",
|
||||
configSchema: zMutesConfig,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zNameHistoryConfig } from "./types.js";
|
||||
|
||||
export const nameHistoryPluginInfo: ZeppelinPluginInfo = {
|
||||
export const nameHistoryPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Name history",
|
||||
type: "internal",
|
||||
configSchema: zNameHistoryConfig,
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zPersistConfig } from "./types.js";
|
||||
|
||||
export const persistPluginInfo: ZeppelinPluginInfo = {
|
||||
export const persistPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Persist",
|
||||
description: trimPluginDescription(`
|
||||
Re-apply roles or nicknames for users when they rejoin the server.
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zPhishermanConfig } from "./types.js";
|
||||
|
||||
export const phishermanPluginInfo: ZeppelinPluginInfo = {
|
||||
export const phishermanPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Phisherman",
|
||||
type: "stable",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zPingableRolesConfig } from "./types.js";
|
||||
|
||||
export const pingableRolesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const pingableRolesPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Pingable roles",
|
||||
configSchema: zPingableRolesConfig,
|
||||
type: "stable",
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zPostConfig } from "./types.js";
|
||||
|
||||
export const postPluginInfo: ZeppelinPluginInfo = {
|
||||
export const postPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Post",
|
||||
configSchema: zPostConfig,
|
||||
type: "stable",
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zReactionRolesConfig } from "./types.js";
|
||||
|
||||
export const reactionRolesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const reactionRolesPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Reaction roles",
|
||||
description: "Consider using the [Role buttons](https://zeppelin.gg/docs/plugins/role_buttons) plugin instead.",
|
||||
type: "legacy",
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zRemindersConfig } from "./types.js";
|
||||
|
||||
export const remindersPluginInfo: ZeppelinPluginInfo = {
|
||||
export const remindersPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Reminders",
|
||||
configSchema: zRemindersConfig,
|
||||
type: "stable",
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zRoleButtonsConfig } from "./types.js";
|
||||
|
||||
export const roleButtonsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const roleButtonsPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Role buttons",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zRoleManagerConfig } from "./types.js";
|
||||
|
||||
export const roleManagerPluginInfo: ZeppelinPluginInfo = {
|
||||
export const roleManagerPluginDocs: ZeppelinPluginDocs = {
|
||||
prettyName: "Role manager",
|
||||
type: "internal",
|
||||
configSchema: zRoleManagerConfig,
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zRolesConfig } from "./types.js";
|
||||
|
||||
export const rolesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const rolesPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Roles",
|
||||
description: trimPluginDescription(`
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zSelfGrantableRolesConfig } from "./types.js";
|
||||
|
||||
export const selfGrantableRolesPluginInfo: ZeppelinPluginInfo = {
|
||||
export const selfGrantableRolesPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Self-grantable roles",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zSlowmodeConfig } from "./types.js";
|
||||
|
||||
export const slowmodePluginInfo: ZeppelinPluginInfo = {
|
||||
export const slowmodePluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Slowmode",
|
||||
configSchema: zSlowmodeConfig,
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zSpamConfig } from "./types.js";
|
||||
|
||||
export const spamPluginInfo: ZeppelinPluginInfo = {
|
||||
export const spamPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "legacy",
|
||||
prettyName: "Spam protection",
|
||||
description: trimPluginDescription(`
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zStarboardConfig } from "./types.js";
|
||||
|
||||
export const starboardPluginInfo: ZeppelinPluginInfo = {
|
||||
export const starboardPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Starboard",
|
||||
description: trimPluginDescription(`
|
|
@ -1,9 +1,9 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { TemplateFunctions } from "./templateFunctions.js";
|
||||
import { TemplateFunction, zTagsConfig } from "./types.js";
|
||||
|
||||
export const tagsPluginInfo: ZeppelinPluginInfo = {
|
||||
export const tagsPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Tags",
|
||||
description: "Tags are a way to store and reuse information.",
|
|
@ -1,8 +1,8 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { trimPluginDescription } from "../../utils.js";
|
||||
import { zTimeAndDateConfig } from "./types.js";
|
||||
|
||||
export const timeAndDatePluginInfo: ZeppelinPluginInfo = {
|
||||
export const timeAndDatePluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Time and date",
|
||||
description: trimPluginDescription(`
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zUsernameSaverConfig } from "./types.js";
|
||||
|
||||
export const usernameSaverPluginInfo: ZeppelinPluginInfo = {
|
||||
export const usernameSaverPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "internal",
|
||||
prettyName: "Username saver",
|
||||
configSchema: zUsernameSaverConfig,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zUtilityConfig } from "./types.js";
|
||||
|
||||
export const utilityPluginInfo: ZeppelinPluginInfo = {
|
||||
export const utilityPluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Utility",
|
||||
configSchema: zUtilityConfig,
|
|
@ -1,7 +1,7 @@
|
|||
import { ZeppelinPluginInfo } from "../../types.js";
|
||||
import { ZeppelinPluginDocs } from "../../types.js";
|
||||
import { zWelcomeMessageConfig } from "./types.js";
|
||||
|
||||
export const welcomeMessagePluginInfo: ZeppelinPluginInfo = {
|
||||
export const welcomeMessagePluginDocs: ZeppelinPluginDocs = {
|
||||
type: "stable",
|
||||
prettyName: "Welcome message",
|
||||
configSchema: zWelcomeMessageConfig,
|
|
@ -1,100 +1,247 @@
|
|||
import { GlobalPluginBlueprint, GuildPluginBlueprint } from "knub";
|
||||
import { ZeppelinGlobalPluginInfo, ZeppelinGuildPluginInfo } from "../types.js";
|
||||
import { AutoDeletePlugin } from "./AutoDelete/AutoDeletePlugin.js";
|
||||
import { autoDeletePluginDocs } from "./AutoDelete/docs.js";
|
||||
import { AutoReactionsPlugin } from "./AutoReactions/AutoReactionsPlugin.js";
|
||||
import { autoReactionsPluginDocs } from "./AutoReactions/docs.js";
|
||||
import { AutomodPlugin } from "./Automod/AutomodPlugin.js";
|
||||
import { automodPluginDocs } from "./Automod/docs.js";
|
||||
import { BotControlPlugin } from "./BotControl/BotControlPlugin.js";
|
||||
import { botControlPluginDocs } from "./BotControl/docs.js";
|
||||
import { CasesPlugin } from "./Cases/CasesPlugin.js";
|
||||
import { casesPluginDocs } from "./Cases/docs.js";
|
||||
import { CensorPlugin } from "./Censor/CensorPlugin.js";
|
||||
import { ChannelArchiverPlugin } from "./ChannelArchiver/ChannelArchiverPlugin.js";
|
||||
import { censorPluginDocs } from "./Censor/docs.js";
|
||||
import { CompanionChannelsPlugin } from "./CompanionChannels/CompanionChannelsPlugin.js";
|
||||
import { companionChannelsPluginDocs } from "./CompanionChannels/docs.js";
|
||||
import { ContextMenuPlugin } from "./ContextMenus/ContextMenuPlugin.js";
|
||||
import { contextMenuPluginDocs } from "./ContextMenus/docs.js";
|
||||
import { CountersPlugin } from "./Counters/CountersPlugin.js";
|
||||
import { countersPluginDocs } from "./Counters/docs.js";
|
||||
import { CustomEventsPlugin } from "./CustomEvents/CustomEventsPlugin.js";
|
||||
import { customEventsPluginDocs } from "./CustomEvents/docs.js";
|
||||
import { GuildAccessMonitorPlugin } from "./GuildAccessMonitor/GuildAccessMonitorPlugin.js";
|
||||
import { guildAccessMonitorPluginDocs } from "./GuildAccessMonitor/docs.js";
|
||||
import { GuildConfigReloaderPlugin } from "./GuildConfigReloader/GuildConfigReloaderPlugin.js";
|
||||
import { guildConfigReloaderPluginDocs } from "./GuildConfigReloader/docs.js";
|
||||
import { GuildInfoSaverPlugin } from "./GuildInfoSaver/GuildInfoSaverPlugin.js";
|
||||
import { guildInfoSaverPluginDocs } from "./GuildInfoSaver/docs.js";
|
||||
import { InternalPosterPlugin } from "./InternalPoster/InternalPosterPlugin.js";
|
||||
import { internalPosterPluginDocs } from "./InternalPoster/docs.js";
|
||||
import { LocateUserPlugin } from "./LocateUser/LocateUserPlugin.js";
|
||||
import { locateUserPluginDocs } from "./LocateUser/docs.js";
|
||||
import { LogsPlugin } from "./Logs/LogsPlugin.js";
|
||||
import { logsPluginDocs } from "./Logs/docs.js";
|
||||
import { MessageSaverPlugin } from "./MessageSaver/MessageSaverPlugin.js";
|
||||
import { messageSaverPluginDocs } from "./MessageSaver/docs.js";
|
||||
import { ModActionsPlugin } from "./ModActions/ModActionsPlugin.js";
|
||||
import { modActionsPluginDocs } from "./ModActions/docs.js";
|
||||
import { MutesPlugin } from "./Mutes/MutesPlugin.js";
|
||||
import { mutesPluginDocs } from "./Mutes/docs.js";
|
||||
import { NameHistoryPlugin } from "./NameHistory/NameHistoryPlugin.js";
|
||||
import { nameHistoryPluginDocs } from "./NameHistory/docs.js";
|
||||
import { PersistPlugin } from "./Persist/PersistPlugin.js";
|
||||
import { persistPluginDocs } from "./Persist/docs.js";
|
||||
import { PhishermanPlugin } from "./Phisherman/PhishermanPlugin.js";
|
||||
import { phishermanPluginDocs } from "./Phisherman/docs.js";
|
||||
import { PingableRolesPlugin } from "./PingableRoles/PingableRolesPlugin.js";
|
||||
import { pingableRolesPluginDocs } from "./PingableRoles/docs.js";
|
||||
import { PostPlugin } from "./Post/PostPlugin.js";
|
||||
import { postPluginDocs } from "./Post/docs.js";
|
||||
import { ReactionRolesPlugin } from "./ReactionRoles/ReactionRolesPlugin.js";
|
||||
import { reactionRolesPluginDocs } from "./ReactionRoles/docs.js";
|
||||
import { RemindersPlugin } from "./Reminders/RemindersPlugin.js";
|
||||
import { remindersPluginDocs } from "./Reminders/docs.js";
|
||||
import { RoleButtonsPlugin } from "./RoleButtons/RoleButtonsPlugin.js";
|
||||
import { roleButtonsPluginDocs } from "./RoleButtons/docs.js";
|
||||
import { RoleManagerPlugin } from "./RoleManager/RoleManagerPlugin.js";
|
||||
import { roleManagerPluginDocs } from "./RoleManager/docs.js";
|
||||
import { RolesPlugin } from "./Roles/RolesPlugin.js";
|
||||
import { rolesPluginDocs } from "./Roles/docs.js";
|
||||
import { SelfGrantableRolesPlugin } from "./SelfGrantableRoles/SelfGrantableRolesPlugin.js";
|
||||
import { selfGrantableRolesPluginDocs } from "./SelfGrantableRoles/docs.js";
|
||||
import { SlowmodePlugin } from "./Slowmode/SlowmodePlugin.js";
|
||||
import { slowmodePluginDocs } from "./Slowmode/docs.js";
|
||||
import { SpamPlugin } from "./Spam/SpamPlugin.js";
|
||||
import { spamPluginDocs } from "./Spam/docs.js";
|
||||
import { StarboardPlugin } from "./Starboard/StarboardPlugin.js";
|
||||
import { starboardPluginDocs } from "./Starboard/docs.js";
|
||||
import { TagsPlugin } from "./Tags/TagsPlugin.js";
|
||||
import { tagsPluginDocs } from "./Tags/docs.js";
|
||||
import { TimeAndDatePlugin } from "./TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { timeAndDatePluginDocs } from "./TimeAndDate/docs.js";
|
||||
import { UsernameSaverPlugin } from "./UsernameSaver/UsernameSaverPlugin.js";
|
||||
import { usernameSaverPluginDocs } from "./UsernameSaver/docs.js";
|
||||
import { UtilityPlugin } from "./Utility/UtilityPlugin.js";
|
||||
import { utilityPluginDocs } from "./Utility/docs.js";
|
||||
import { WelcomeMessagePlugin } from "./WelcomeMessage/WelcomeMessagePlugin.js";
|
||||
import { welcomeMessagePluginDocs } from "./WelcomeMessage/docs.js";
|
||||
|
||||
// prettier-ignore
|
||||
export const guildPlugins: Array<GuildPluginBlueprint<any, any>> = [
|
||||
AutoDeletePlugin,
|
||||
AutoReactionsPlugin,
|
||||
GuildInfoSaverPlugin,
|
||||
CensorPlugin,
|
||||
ChannelArchiverPlugin,
|
||||
LocateUserPlugin,
|
||||
LogsPlugin,
|
||||
PersistPlugin,
|
||||
PingableRolesPlugin,
|
||||
PostPlugin,
|
||||
ReactionRolesPlugin,
|
||||
MessageSaverPlugin,
|
||||
// GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin
|
||||
ModActionsPlugin,
|
||||
NameHistoryPlugin,
|
||||
RemindersPlugin,
|
||||
RolesPlugin,
|
||||
SelfGrantableRolesPlugin,
|
||||
SlowmodePlugin,
|
||||
SpamPlugin,
|
||||
StarboardPlugin,
|
||||
TagsPlugin,
|
||||
UsernameSaverPlugin,
|
||||
UtilityPlugin,
|
||||
WelcomeMessagePlugin,
|
||||
CasesPlugin,
|
||||
MutesPlugin,
|
||||
AutomodPlugin,
|
||||
CompanionChannelsPlugin,
|
||||
CustomEventsPlugin,
|
||||
TimeAndDatePlugin,
|
||||
CountersPlugin,
|
||||
ContextMenuPlugin,
|
||||
PhishermanPlugin,
|
||||
InternalPosterPlugin,
|
||||
RoleManagerPlugin,
|
||||
RoleButtonsPlugin,
|
||||
export const availableGuildPlugins: ZeppelinGuildPluginInfo[] = [
|
||||
{
|
||||
plugin: AutoDeletePlugin,
|
||||
docs: autoDeletePluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: AutomodPlugin,
|
||||
docs: automodPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: AutoReactionsPlugin,
|
||||
docs: autoReactionsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: CasesPlugin,
|
||||
docs: casesPluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
{
|
||||
plugin: CensorPlugin,
|
||||
docs: censorPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: CompanionChannelsPlugin,
|
||||
docs: companionChannelsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: ContextMenuPlugin,
|
||||
docs: contextMenuPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: CountersPlugin,
|
||||
docs: countersPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: CustomEventsPlugin,
|
||||
docs: customEventsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: GuildInfoSaverPlugin,
|
||||
docs: guildInfoSaverPluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
// FIXME: New caching thing, or fix deadlocks with this plugin
|
||||
// {
|
||||
// plugin: GuildMemberCachePlugin,
|
||||
// docs: guildMemberCachePluginDocs,
|
||||
// autoload: true,
|
||||
// },
|
||||
{
|
||||
plugin: InternalPosterPlugin,
|
||||
docs: internalPosterPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: LocateUserPlugin,
|
||||
docs: locateUserPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: LogsPlugin,
|
||||
docs: logsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: MessageSaverPlugin,
|
||||
docs: messageSaverPluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
{
|
||||
plugin: ModActionsPlugin,
|
||||
docs: modActionsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: MutesPlugin,
|
||||
docs: mutesPluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
{
|
||||
plugin: NameHistoryPlugin,
|
||||
docs: nameHistoryPluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
{
|
||||
plugin: PersistPlugin,
|
||||
docs: persistPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: PhishermanPlugin,
|
||||
docs: phishermanPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: PingableRolesPlugin,
|
||||
docs: pingableRolesPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: PostPlugin,
|
||||
docs: postPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: ReactionRolesPlugin,
|
||||
docs: reactionRolesPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: RemindersPlugin,
|
||||
docs: remindersPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: RoleButtonsPlugin,
|
||||
docs: roleButtonsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: RoleManagerPlugin,
|
||||
docs: roleManagerPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: RolesPlugin,
|
||||
docs: rolesPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: SelfGrantableRolesPlugin,
|
||||
docs: selfGrantableRolesPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: SlowmodePlugin,
|
||||
docs: slowmodePluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: SpamPlugin,
|
||||
docs: spamPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: StarboardPlugin,
|
||||
docs: starboardPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: TagsPlugin,
|
||||
docs: tagsPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: TimeAndDatePlugin,
|
||||
docs: timeAndDatePluginDocs,
|
||||
autoload: true,
|
||||
},
|
||||
{
|
||||
plugin: UsernameSaverPlugin,
|
||||
docs: usernameSaverPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: UtilityPlugin,
|
||||
docs: utilityPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: WelcomeMessagePlugin,
|
||||
docs: welcomeMessagePluginDocs,
|
||||
},
|
||||
];
|
||||
|
||||
// prettier-ignore
|
||||
export const globalPlugins: Array<GlobalPluginBlueprint<any, any>> = [
|
||||
GuildConfigReloaderPlugin,
|
||||
BotControlPlugin,
|
||||
GuildAccessMonitorPlugin,
|
||||
];
|
||||
|
||||
// prettier-ignore
|
||||
export const baseGuildPlugins: Array<GuildPluginBlueprint<any, any>> = [
|
||||
GuildInfoSaverPlugin,
|
||||
MessageSaverPlugin,
|
||||
NameHistoryPlugin,
|
||||
// GuildMemberCachePlugin, // FIXME: New caching thing, or fix deadlocks with this plugin
|
||||
CasesPlugin,
|
||||
MutesPlugin,
|
||||
TimeAndDatePlugin,
|
||||
// TODO: Replace these with proper dependencies
|
||||
export const availableGlobalPlugins: ZeppelinGlobalPluginInfo[] = [
|
||||
{
|
||||
plugin: GuildConfigReloaderPlugin,
|
||||
docs: guildConfigReloaderPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: BotControlPlugin,
|
||||
docs: botControlPluginDocs,
|
||||
},
|
||||
{
|
||||
plugin: GuildAccessMonitorPlugin,
|
||||
docs: guildAccessMonitorPluginDocs,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1,109 +0,0 @@
|
|||
import { ZeppelinPluginInfo } from "../types.js";
|
||||
import { AutoDeletePlugin } from "./AutoDelete/AutoDeletePlugin.js";
|
||||
import { autoDeletePluginInfo } from "./AutoDelete/info.js";
|
||||
import { AutoReactionsPlugin } from "./AutoReactions/AutoReactionsPlugin.js";
|
||||
import { autoReactionsInfo } from "./AutoReactions/info.js";
|
||||
import { AutomodPlugin } from "./Automod/AutomodPlugin.js";
|
||||
import { automodPluginInfo } from "./Automod/info.js";
|
||||
import { CasesPlugin } from "./Cases/CasesPlugin.js";
|
||||
import { casesPluginInfo } from "./Cases/info.js";
|
||||
import { CensorPlugin } from "./Censor/CensorPlugin.js";
|
||||
import { censorPluginInfo } from "./Censor/info.js";
|
||||
import { CompanionChannelsPlugin } from "./CompanionChannels/CompanionChannelsPlugin.js";
|
||||
import { companionChannelsPluginInfo } from "./CompanionChannels/info.js";
|
||||
import { ContextMenuPlugin } from "./ContextMenus/ContextMenuPlugin.js";
|
||||
import { contextMenuPluginInfo } from "./ContextMenus/info.js";
|
||||
import { CountersPlugin } from "./Counters/CountersPlugin.js";
|
||||
import { countersPluginInfo } from "./Counters/info.js";
|
||||
import { CustomEventsPlugin } from "./CustomEvents/CustomEventsPlugin.js";
|
||||
import { customEventsPluginInfo } from "./CustomEvents/info.js";
|
||||
import { GuildInfoSaverPlugin } from "./GuildInfoSaver/GuildInfoSaverPlugin.js";
|
||||
import { guildInfoSaverPluginInfo } from "./GuildInfoSaver/info.js";
|
||||
import { InternalPosterPlugin } from "./InternalPoster/InternalPosterPlugin.js";
|
||||
import { internalPosterPluginInfo } from "./InternalPoster/info.js";
|
||||
import { LocateUserPlugin } from "./LocateUser/LocateUserPlugin.js";
|
||||
import { locateUserPluginInfo } from "./LocateUser/info.js";
|
||||
import { LogsPlugin } from "./Logs/LogsPlugin.js";
|
||||
import { logsPluginInfo } from "./Logs/info.js";
|
||||
import { MessageSaverPlugin } from "./MessageSaver/MessageSaverPlugin.js";
|
||||
import { messageSaverPluginInfo } from "./MessageSaver/info.js";
|
||||
import { ModActionsPlugin } from "./ModActions/ModActionsPlugin.js";
|
||||
import { modActionsPluginInfo } from "./ModActions/info.js";
|
||||
import { MutesPlugin } from "./Mutes/MutesPlugin.js";
|
||||
import { mutesPluginInfo } from "./Mutes/info.js";
|
||||
import { NameHistoryPlugin } from "./NameHistory/NameHistoryPlugin.js";
|
||||
import { nameHistoryPluginInfo } from "./NameHistory/info.js";
|
||||
import { PersistPlugin } from "./Persist/PersistPlugin.js";
|
||||
import { persistPluginInfo } from "./Persist/info.js";
|
||||
import { PhishermanPlugin } from "./Phisherman/PhishermanPlugin.js";
|
||||
import { phishermanPluginInfo } from "./Phisherman/info.js";
|
||||
import { PingableRolesPlugin } from "./PingableRoles/PingableRolesPlugin.js";
|
||||
import { pingableRolesPluginInfo } from "./PingableRoles/info.js";
|
||||
import { PostPlugin } from "./Post/PostPlugin.js";
|
||||
import { postPluginInfo } from "./Post/info.js";
|
||||
import { ReactionRolesPlugin } from "./ReactionRoles/ReactionRolesPlugin.js";
|
||||
import { reactionRolesPluginInfo } from "./ReactionRoles/info.js";
|
||||
import { RemindersPlugin } from "./Reminders/RemindersPlugin.js";
|
||||
import { remindersPluginInfo } from "./Reminders/info.js";
|
||||
import { RoleButtonsPlugin } from "./RoleButtons/RoleButtonsPlugin.js";
|
||||
import { roleButtonsPluginInfo } from "./RoleButtons/info.js";
|
||||
import { RoleManagerPlugin } from "./RoleManager/RoleManagerPlugin.js";
|
||||
import { roleManagerPluginInfo } from "./RoleManager/info.js";
|
||||
import { RolesPlugin } from "./Roles/RolesPlugin.js";
|
||||
import { rolesPluginInfo } from "./Roles/info.js";
|
||||
import { SelfGrantableRolesPlugin } from "./SelfGrantableRoles/SelfGrantableRolesPlugin.js";
|
||||
import { selfGrantableRolesPluginInfo } from "./SelfGrantableRoles/info.js";
|
||||
import { SlowmodePlugin } from "./Slowmode/SlowmodePlugin.js";
|
||||
import { slowmodePluginInfo } from "./Slowmode/info.js";
|
||||
import { SpamPlugin } from "./Spam/SpamPlugin.js";
|
||||
import { spamPluginInfo } from "./Spam/info.js";
|
||||
import { StarboardPlugin } from "./Starboard/StarboardPlugin.js";
|
||||
import { starboardPluginInfo } from "./Starboard/info.js";
|
||||
import { TagsPlugin } from "./Tags/TagsPlugin.js";
|
||||
import { tagsPluginInfo } from "./Tags/info.js";
|
||||
import { TimeAndDatePlugin } from "./TimeAndDate/TimeAndDatePlugin.js";
|
||||
import { timeAndDatePluginInfo } from "./TimeAndDate/info.js";
|
||||
import { UsernameSaverPlugin } from "./UsernameSaver/UsernameSaverPlugin.js";
|
||||
import { usernameSaverPluginInfo } from "./UsernameSaver/info.js";
|
||||
import { UtilityPlugin } from "./Utility/UtilityPlugin.js";
|
||||
import { utilityPluginInfo } from "./Utility/info.js";
|
||||
import { WelcomeMessagePlugin } from "./WelcomeMessage/WelcomeMessagePlugin.js";
|
||||
import { welcomeMessagePluginInfo } from "./WelcomeMessage/info.js";
|
||||
|
||||
export const guildPluginInfo: Record<string, ZeppelinPluginInfo> = {
|
||||
[AutoDeletePlugin.name]: autoDeletePluginInfo,
|
||||
[AutoReactionsPlugin.name]: autoReactionsInfo,
|
||||
[GuildInfoSaverPlugin.name]: guildInfoSaverPluginInfo,
|
||||
[CensorPlugin.name]: censorPluginInfo,
|
||||
[LocateUserPlugin.name]: locateUserPluginInfo,
|
||||
[LogsPlugin.name]: logsPluginInfo,
|
||||
[PersistPlugin.name]: persistPluginInfo,
|
||||
[PingableRolesPlugin.name]: pingableRolesPluginInfo,
|
||||
[PostPlugin.name]: postPluginInfo,
|
||||
[ReactionRolesPlugin.name]: reactionRolesPluginInfo,
|
||||
[MessageSaverPlugin.name]: messageSaverPluginInfo,
|
||||
[ModActionsPlugin.name]: modActionsPluginInfo,
|
||||
[NameHistoryPlugin.name]: nameHistoryPluginInfo,
|
||||
[RemindersPlugin.name]: remindersPluginInfo,
|
||||
[RolesPlugin.name]: rolesPluginInfo,
|
||||
[SelfGrantableRolesPlugin.name]: selfGrantableRolesPluginInfo,
|
||||
[SlowmodePlugin.name]: slowmodePluginInfo,
|
||||
[SpamPlugin.name]: spamPluginInfo,
|
||||
[StarboardPlugin.name]: starboardPluginInfo,
|
||||
[TagsPlugin.name]: tagsPluginInfo,
|
||||
[UsernameSaverPlugin.name]: usernameSaverPluginInfo,
|
||||
[UtilityPlugin.name]: utilityPluginInfo,
|
||||
[WelcomeMessagePlugin.name]: welcomeMessagePluginInfo,
|
||||
[CasesPlugin.name]: casesPluginInfo,
|
||||
[MutesPlugin.name]: mutesPluginInfo,
|
||||
[AutomodPlugin.name]: automodPluginInfo,
|
||||
[CompanionChannelsPlugin.name]: companionChannelsPluginInfo,
|
||||
[CustomEventsPlugin.name]: customEventsPluginInfo,
|
||||
[TimeAndDatePlugin.name]: timeAndDatePluginInfo,
|
||||
[CountersPlugin.name]: countersPluginInfo,
|
||||
[ContextMenuPlugin.name]: contextMenuPluginInfo,
|
||||
[PhishermanPlugin.name]: phishermanPluginInfo,
|
||||
[InternalPosterPlugin.name]: internalPosterPluginInfo,
|
||||
[RoleManagerPlugin.name]: roleManagerPluginInfo,
|
||||
[RoleButtonsPlugin.name]: roleButtonsPluginInfo,
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
import { BaseConfig, Knub } from "knub";
|
||||
import { BaseConfig, GlobalPluginBlueprint, GuildPluginBlueprint, Knub } from "knub";
|
||||
import z, { ZodTypeAny } from "zod";
|
||||
import { zSnowflake } from "./utils.js";
|
||||
|
||||
|
@ -33,12 +33,24 @@ export type TZeppelinKnub = Knub;
|
|||
*/
|
||||
export type TMarkdown = string;
|
||||
|
||||
export type ZeppelinPluginType = "stable" | "legacy" | "internal";
|
||||
export interface ZeppelinGuildPluginInfo {
|
||||
plugin: GuildPluginBlueprint<any, any>;
|
||||
docs: ZeppelinPluginDocs;
|
||||
autoload?: boolean;
|
||||
}
|
||||
|
||||
export interface ZeppelinPluginInfo {
|
||||
type: ZeppelinPluginType;
|
||||
prettyName: string;
|
||||
export interface ZeppelinGlobalPluginInfo {
|
||||
plugin: GlobalPluginBlueprint<any, any>;
|
||||
docs: ZeppelinPluginDocs;
|
||||
}
|
||||
|
||||
export type DocsPluginType = "stable" | "legacy" | "internal";
|
||||
|
||||
export interface ZeppelinPluginDocs {
|
||||
type: DocsPluginType;
|
||||
configSchema: ZodTypeAny;
|
||||
|
||||
prettyName?: string;
|
||||
description?: TMarkdown;
|
||||
usageGuide?: TMarkdown;
|
||||
configurationGuide?: TMarkdown;
|
||||
|
|
Loading…
Add table
Reference in a new issue