Merge pull request #207 from almeidx/docs/added-legacy-plugins-section
docs: Added legacy plugins section
This commit is contained in:
commit
a0c2c16385
6 changed files with 13 additions and 2 deletions
|
@ -37,7 +37,7 @@ export function initDocs(app: express.Express) {
|
|||
app.get("/docs/plugins", (req: express.Request, res: express.Response) => {
|
||||
res.json(
|
||||
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 {
|
||||
name: plugin.name,
|
||||
info: thinInfo,
|
||||
|
|
|
@ -52,6 +52,7 @@ export const CensorPlugin = zeppelinGuildPlugin<CensorPluginType>()({
|
|||
Censor words, tokens, links, regex, etc.
|
||||
For more advanced filtering, check out the Automod plugin!
|
||||
`),
|
||||
legacy: true,
|
||||
},
|
||||
|
||||
dependencies: [LogsPlugin],
|
||||
|
|
|
@ -51,6 +51,7 @@ export const SpamPlugin = zeppelinGuildPlugin<SpamPluginType>()({
|
|||
Basic spam detection and auto-muting.
|
||||
For more advanced spam filtering, check out the Automod plugin!
|
||||
`),
|
||||
legacy: true,
|
||||
},
|
||||
|
||||
dependencies: [LogsPlugin],
|
||||
|
|
|
@ -27,6 +27,7 @@ export interface ZeppelinGuildPluginBlueprint<TPluginData extends GuildPluginDat
|
|||
description?: TMarkdown;
|
||||
usageGuide?: TMarkdown;
|
||||
configurationGuide?: TMarkdown;
|
||||
legacy?: boolean;
|
||||
};
|
||||
|
||||
configPreprocessor?: (
|
||||
|
|
|
@ -49,6 +49,7 @@ export interface ZeppelinPluginInfo {
|
|||
description?: TMarkdown;
|
||||
usageGuide?: TMarkdown;
|
||||
configurationGuide?: TMarkdown;
|
||||
legacy?: boolean;
|
||||
}
|
||||
|
||||
export interface CommandInfo {
|
||||
|
|
|
@ -155,7 +155,14 @@
|
|||
...menu,
|
||||
{
|
||||
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,
|
||||
to: `/docs/plugins/${plugin.name}`,
|
||||
})),
|
||||
|
|
Loading…
Add table
Reference in a new issue