3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 20:35:02 +00:00

knub commands => messageCommands

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
metal 2023-03-11 23:58:12 +00:00 committed by GitHub
parent 1dca8c4447
commit cd68a6083c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 37 additions and 35 deletions

View file

@ -45,10 +45,10 @@
<MarkdownBlock :content="data.info.usageGuide" class="content" />
</div>
<!-- Command list -->
<div v-if="data.commands.length">
<h3 id="commands" class="text-2xl">Commands</h3>
<div v-for="command in data.commands"
<!-- Message Command list -->
<div v-if="data.messageCommands.length">
<h3 id="commands" class="text-2xl">Message Commands</h3>
<div v-for="command in data.messageCommands"
class="command mb-4"
v-bind:ref="getCommandSlug(command)" v-bind:class="{target: targetCommandId === getCommandSlug(command)}">
<h4 class="text-xl font-semibold mb-0">
@ -309,7 +309,8 @@
},
hasUsageInfo() {
if (!this.data) return true;
if (this.data.commands.length) return true;
if (this.data.messageCommands.length) return true;
if (this.data.slashCommands.length) return true;
if (this.data.info.usageGuide) return true;
return false;
},

View file

@ -34,8 +34,8 @@ export const DocsStore: Module<DocsState, RootState> = {
if (state.plugins[name]) return;
const data = await get(`docs/plugins/${name}`);
if (data && data.commands) {
data.commands.sort((a, b) => {
if (data && data.messageCommands) {
data.messageCommands.sort((a, b) => {
const aName = (Array.isArray(a.trigger) ? a.trigger[0] : a.trigger).toLowerCase();
const bName = (Array.isArray(b.trigger) ? b.trigger[0] : b.trigger).toLowerCase();
if (aName > bName) return 1;

View file

@ -54,7 +54,8 @@ export interface ThinDocsPlugin {
}
export interface DocsPlugin extends ThinDocsPlugin {
commands: any[];
messageCommands: any[];
slashCommands: any[];
defaultOptions: any;
configSchema?: string;
info: {