3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Merge pull request #207 from almeidx/docs/added-legacy-plugins-section

docs: Added legacy plugins section
This commit is contained in:
Miikka 2021-08-14 17:30:32 +03:00 committed by GitHub
commit a0c2c16385
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 13 additions and 2 deletions

View file

@ -37,7 +37,7 @@ export function initDocs(app: express.Express) {
app.get("/docs/plugins", (req: express.Request, res: express.Response) => { app.get("/docs/plugins", (req: express.Request, res: express.Response) => {
res.json( res.json(
docsPlugins.map(plugin => { docsPlugins.map(plugin => {
const thinInfo = plugin.info ? { prettyName: plugin.info.prettyName } : {}; const thinInfo = plugin.info ? { prettyName: plugin.info.prettyName, legacy: plugin.info.legacy ?? false } : {};
return { return {
name: plugin.name, name: plugin.name,
info: thinInfo, info: thinInfo,

View file

@ -52,6 +52,7 @@ export const CensorPlugin = zeppelinGuildPlugin<CensorPluginType>()({
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!
`), `),
legacy: true,
}, },
dependencies: [LogsPlugin], dependencies: [LogsPlugin],

View file

@ -51,6 +51,7 @@ export const SpamPlugin = zeppelinGuildPlugin<SpamPluginType>()({
Basic spam detection and auto-muting. Basic spam detection and auto-muting.
For more advanced spam filtering, check out the Automod plugin! For more advanced spam filtering, check out the Automod plugin!
`), `),
legacy: true,
}, },
dependencies: [LogsPlugin], dependencies: [LogsPlugin],

View file

@ -27,6 +27,7 @@ export interface ZeppelinGuildPluginBlueprint<TPluginData extends GuildPluginDat
description?: TMarkdown; description?: TMarkdown;
usageGuide?: TMarkdown; usageGuide?: TMarkdown;
configurationGuide?: TMarkdown; configurationGuide?: TMarkdown;
legacy?: boolean;
}; };
configPreprocessor?: ( configPreprocessor?: (

View file

@ -49,6 +49,7 @@ export interface ZeppelinPluginInfo {
description?: TMarkdown; description?: TMarkdown;
usageGuide?: TMarkdown; usageGuide?: TMarkdown;
configurationGuide?: TMarkdown; configurationGuide?: TMarkdown;
legacy?: boolean;
} }
export interface CommandInfo { export interface CommandInfo {

View file

@ -155,7 +155,14 @@
...menu, ...menu,
{ {
label: 'Plugins', label: 'Plugins',
items: this.plugins.map(plugin => ({ items: this.plugins.filter(plugin => !plugin.info.legacy).map(plugin => ({
label: plugin.info.prettyName || plugin.name,
to: `/docs/plugins/${plugin.name}`,
})),
},
{
label: "Legacy Plugins",
items: this.plugins.filter(plugin => plugin.info.legacy).map(plugin => ({
label: plugin.info.prettyName || plugin.name, label: plugin.info.prettyName || plugin.name,
to: `/docs/plugins/${plugin.name}`, to: `/docs/plugins/${plugin.name}`,
})), })),