3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-14 21:31:50 +00:00

feat: add missing info.configSchemas

This commit is contained in:
Dragory 2024-05-19 10:46:43 +00:00
parent db52c61df4
commit 3b0a0b311d
No known key found for this signature in database
19 changed files with 46 additions and 0 deletions

View file

@ -1,8 +1,10 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zAutoDeleteConfig } from "./types.js";
export const autoDeletePluginInfo: ZeppelinPluginInfo = { export const autoDeletePluginInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
prettyName: "Auto-delete", prettyName: "Auto-delete",
description: "Allows Zeppelin to auto-delete messages from a channel after a delay", description: "Allows Zeppelin to auto-delete messages from a channel after a delay",
configurationGuide: "Maximum deletion delay is currently 5 minutes", configurationGuide: "Maximum deletion delay is currently 5 minutes",
configSchema: zAutoDeleteConfig,
}; };

View file

@ -1,5 +1,6 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { trimPluginDescription } from "../../utils.js"; import { trimPluginDescription } from "../../utils.js";
import { zAutoReactionsConfig } from "./types.js";
export const autoReactionsInfo: ZeppelinPluginInfo = { export const autoReactionsInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
@ -7,4 +8,5 @@ export const autoReactionsInfo: ZeppelinPluginInfo = {
description: trimPluginDescription(` description: trimPluginDescription(`
Allows setting up automatic reactions to all new messages on a channel Allows setting up automatic reactions to all new messages on a channel
`), `),
configSchema: zAutoReactionsConfig,
}; };

View file

@ -1,9 +1,11 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { trimPluginDescription } from "../../utils.js"; import { trimPluginDescription } from "../../utils.js";
import { zAutomodConfig } from "./types.js";
export const automodPluginInfo: ZeppelinPluginInfo = { export const automodPluginInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
prettyName: "Automod", prettyName: "Automod",
configSchema: zAutomodConfig,
description: trimPluginDescription(` description: trimPluginDescription(`
Allows specifying automated actions in response to triggers. Example use cases include word filtering and spam prevention. Allows specifying automated actions in response to triggers. Example use cases include word filtering and spam prevention.
`), `),

View file

@ -1,9 +1,11 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { trimPluginDescription } from "../../utils.js"; import { trimPluginDescription } from "../../utils.js";
import { zCasesConfig } from "./types.js";
export const casesPluginInfo: ZeppelinPluginInfo = { export const casesPluginInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
prettyName: "Cases", prettyName: "Cases",
configSchema: zCasesConfig,
description: trimPluginDescription(` description: trimPluginDescription(`
This plugin contains basic configuration for cases created by other plugins This plugin contains basic configuration for cases created by other plugins
`), `),

View file

@ -1,10 +1,12 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { trimPluginDescription } from "../../utils.js"; import { trimPluginDescription } from "../../utils.js";
import { zCensorConfig } from "./types.js";
export const censorPluginInfo: ZeppelinPluginInfo = { export const censorPluginInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
legacy: true, legacy: true,
prettyName: "Censor", prettyName: "Censor",
configSchema: zCensorConfig,
description: trimPluginDescription(` description: trimPluginDescription(`
Censor words, tokens, links, regex, etc. Censor words, tokens, links, regex, etc.
For more advanced filtering, check out the Automod plugin! For more advanced filtering, check out the Automod plugin!

View file

@ -1,9 +1,11 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { trimPluginDescription } from "../../utils.js"; import { trimPluginDescription } from "../../utils.js";
import { zCompanionChannelsConfig } from "./types.js";
export const companionChannelsPluginInfo: ZeppelinPluginInfo = { export const companionChannelsPluginInfo: ZeppelinPluginInfo = {
showInDocs: true, showInDocs: true,
prettyName: "Companion channels", prettyName: "Companion channels",
configSchema: zCompanionChannelsConfig,
description: trimPluginDescription(` description: trimPluginDescription(`
Set up 'companion channels' between text and voice channels. Set up 'companion channels' between text and voice channels.
Once set up, any time a user joins one of the specified voice channels, Once set up, any time a user joins one of the specified voice channels,

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zContextMenusConfig } from "./types.js";
export const contextMenuPluginInfo: ZeppelinPluginInfo = { export const contextMenuPluginInfo: ZeppelinPluginInfo = {
showInDocs: false, showInDocs: false,
prettyName: "Context menu", prettyName: "Context menu",
configSchema: zContextMenusConfig,
}; };

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zCustomEventsConfig } from "./types.js";
export const customEventsPluginInfo: ZeppelinPluginInfo = { export const customEventsPluginInfo: ZeppelinPluginInfo = {
prettyName: "Custom events", prettyName: "Custom events",
showInDocs: false, showInDocs: false,
configSchema: zCustomEventsConfig,
}; };

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zGuildConfigReloaderPlugin } from "./types.js";
export const guildConfigReloaderPluginInfo: ZeppelinPluginInfo = { export const guildConfigReloaderPluginInfo: ZeppelinPluginInfo = {
prettyName: "Guild config reloader", prettyName: "Guild config reloader",
showInDocs: false, showInDocs: false,
configSchema: zGuildConfigReloaderPlugin,
}; };

View file

@ -1,8 +1,12 @@
import { BasePluginType } from "knub"; import { BasePluginType } from "knub";
import { Configs } from "../../data/Configs.js"; import { Configs } from "../../data/Configs.js";
import Timeout = NodeJS.Timeout; import Timeout = NodeJS.Timeout;
import { z } from "zod";
export const zGuildConfigReloaderPlugin = z.strictObject({});
export interface GuildConfigReloaderPluginType extends BasePluginType { export interface GuildConfigReloaderPluginType extends BasePluginType {
config: z.infer<typeof zGuildConfigReloaderPlugin>;
state: { state: {
guildConfigs: Configs; guildConfigs: Configs;
unloaded: boolean; unloaded: boolean;

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zGuildInfoSaverConfig } from "./types.js";
export const guildInfoSaverPluginInfo: ZeppelinPluginInfo = { export const guildInfoSaverPluginInfo: ZeppelinPluginInfo = {
prettyName: "Guild info saver", prettyName: "Guild info saver",
showInDocs: false, showInDocs: false,
configSchema: zGuildInfoSaverConfig,
}; };

View file

@ -1,6 +1,10 @@
import { BasePluginType } from "knub"; import { BasePluginType } from "knub";
import { z } from "zod";
export const zGuildInfoSaverConfig = z.strictObject({});
export interface GuildInfoSaverPluginType extends BasePluginType { export interface GuildInfoSaverPluginType extends BasePluginType {
config: z.infer<typeof zGuildInfoSaverConfig>;
state: { state: {
updateInterval: NodeJS.Timeout; updateInterval: NodeJS.Timeout;
}; };

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zGuildMemberCacheConfig } from "./types.js";
export const guildMemberCachePluginInfo: ZeppelinPluginInfo = { export const guildMemberCachePluginInfo: ZeppelinPluginInfo = {
prettyName: "Guild member cache", prettyName: "Guild member cache",
showInDocs: false, showInDocs: false,
configSchema: zGuildMemberCacheConfig,
}; };

View file

@ -1,7 +1,11 @@
import { BasePluginType } from "knub"; import { BasePluginType } from "knub";
import { GuildMemberCache } from "../../data/GuildMemberCache.js"; import { GuildMemberCache } from "../../data/GuildMemberCache.js";
import { z } from "zod";
export const zGuildMemberCacheConfig = z.strictObject({});
export interface GuildMemberCachePluginType extends BasePluginType { export interface GuildMemberCachePluginType extends BasePluginType {
config: z.infer<typeof zGuildMemberCacheConfig>;
state: { state: {
memberCache: GuildMemberCache; memberCache: GuildMemberCache;
saveInterval: NodeJS.Timeout; saveInterval: NodeJS.Timeout;

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zInternalPosterConfig } from "./types.js";
export const internalPosterPluginInfo: ZeppelinPluginInfo = { export const internalPosterPluginInfo: ZeppelinPluginInfo = {
prettyName: "Internal poster", prettyName: "Internal poster",
showInDocs: false, showInDocs: false,
configSchema: zInternalPosterConfig,
}; };

View file

@ -2,8 +2,12 @@ import { WebhookClient } from "discord.js";
import { BasePluginType } from "knub"; import { BasePluginType } from "knub";
import { Queue } from "../../Queue.js"; import { Queue } from "../../Queue.js";
import { Webhooks } from "../../data/Webhooks.js"; import { Webhooks } from "../../data/Webhooks.js";
import { z } from "zod";
export const zInternalPosterConfig = z.strictObject({});
export interface InternalPosterPluginType extends BasePluginType { export interface InternalPosterPluginType extends BasePluginType {
config: z.infer<typeof zInternalPosterConfig>;
state: { state: {
queue: Queue; queue: Queue;
webhooks: Webhooks; webhooks: Webhooks;

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zMessageSaverConfig } from "./types.js";
export const messageSaverPluginInfo: ZeppelinPluginInfo = { export const messageSaverPluginInfo: ZeppelinPluginInfo = {
prettyName: "Message saver", prettyName: "Message saver",
showInDocs: false, showInDocs: false,
configSchema: zMessageSaverConfig,
}; };

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zRoleManagerConfig } from "./types.js";
export const roleManagerPluginInfo: ZeppelinPluginInfo = { export const roleManagerPluginInfo: ZeppelinPluginInfo = {
prettyName: "Role manager", prettyName: "Role manager",
showInDocs: false, showInDocs: false,
configSchema: zRoleManagerConfig,
}; };

View file

@ -1,6 +1,8 @@
import { ZeppelinPluginInfo } from "../../types.js"; import { ZeppelinPluginInfo } from "../../types.js";
import { zUsernameSaverConfig } from "./types.js";
export const usernameSaverPluginInfo: ZeppelinPluginInfo = { export const usernameSaverPluginInfo: ZeppelinPluginInfo = {
showInDocs: false, showInDocs: false,
prettyName: "Username saver", prettyName: "Username saver",
configSchema: zUsernameSaverConfig,
}; };