fix: error on dashboard plugin usage page
This commit is contained in:
parent
e43500abba
commit
c3e07c1607
2 changed files with 7 additions and 6 deletions
|
@ -54,9 +54,10 @@ export function initDocs(app: express.Express) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const name = plugin.name;
|
const name = plugin.name;
|
||||||
const info = plugin.info || {};
|
const info = { ...(plugin.info || {}) };
|
||||||
|
delete info.configSchema;
|
||||||
|
|
||||||
const commands = (plugin.messageCommands || []).map((cmd) => ({
|
const messageCommands = (plugin.messageCommands || []).map((cmd) => ({
|
||||||
trigger: cmd.trigger,
|
trigger: cmd.trigger,
|
||||||
permission: cmd.permission,
|
permission: cmd.permission,
|
||||||
signature: cmd.signature,
|
signature: cmd.signature,
|
||||||
|
@ -73,7 +74,7 @@ export function initDocs(app: express.Express) {
|
||||||
info,
|
info,
|
||||||
configSchema,
|
configSchema,
|
||||||
defaultOptions,
|
defaultOptions,
|
||||||
commands,
|
messageCommands,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,9 +46,9 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Message Command list -->
|
<!-- Message Command list -->
|
||||||
<div v-if="data.messageCommands.length">
|
<div v-if="data.messageCommands && data.messageCommands.length">
|
||||||
<h3 id="commands" class="text-2xl">Message Commands</h3>
|
<h3 id="commands" class="text-2xl">Message commands</h3>
|
||||||
<div v-for="command in data.messageCommands"
|
<div v-for="command in (data.messageCommands || [])"
|
||||||
class="command mb-4"
|
class="command mb-4"
|
||||||
v-bind:ref="getCommandSlug(command)" v-bind:class="{target: targetCommandId === getCommandSlug(command)}">
|
v-bind:ref="getCommandSlug(command)" v-bind:class="{target: targetCommandId === getCommandSlug(command)}">
|
||||||
<h4 class="text-xl font-semibold mb-0">
|
<h4 class="text-xl font-semibold mb-0">
|
||||||
|
|
Loading…
Add table
Reference in a new issue