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:
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) => {
|
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,
|
||||||
|
|
|
@ -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],
|
||||||
|
|
|
@ -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],
|
||||||
|
|
|
@ -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?: (
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
|
@ -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}`,
|
||||||
})),
|
})),
|
||||||
|
|
Loading…
Add table
Reference in a new issue