nuxt-discord 0.0.17 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +249 -171
- package/dist/module.d.mts +146 -10
- package/dist/module.json +3 -3
- package/dist/module.mjs +1077 -348
- package/dist/runtime/acknowledgement.d.ts +11 -0
- package/dist/runtime/acknowledgement.js +156 -0
- package/dist/runtime/client/chat-theme.css +52 -0
- package/dist/runtime/client/components/ChatAvatar.d.vue.ts +6 -0
- package/dist/runtime/client/components/ChatAvatar.vue +11 -0
- package/dist/runtime/client/components/ChatAvatar.vue.d.ts +6 -0
- package/dist/runtime/client/components/CommandPicker.d.vue.ts +24 -0
- package/dist/runtime/client/components/CommandPicker.vue +67 -0
- package/dist/runtime/client/components/CommandPicker.vue.d.ts +24 -0
- package/dist/runtime/client/components/CommandReference.d.vue.ts +20 -0
- package/dist/runtime/client/components/CommandReference.vue +21 -0
- package/dist/runtime/client/components/CommandReference.vue.d.ts +20 -0
- package/dist/runtime/client/components/CommandTestBar.d.vue.ts +60 -0
- package/dist/runtime/client/components/CommandTestBar.vue +332 -0
- package/dist/runtime/client/components/CommandTestBar.vue.d.ts +60 -0
- package/dist/runtime/client/components/CommandTranscript.d.vue.ts +39 -0
- package/dist/runtime/client/components/CommandTranscript.vue +147 -0
- package/dist/runtime/client/components/CommandTranscript.vue.d.ts +39 -0
- package/dist/runtime/client/components/ProjectLogo.d.vue.ts +3 -0
- package/dist/runtime/client/components/ProjectLogo.vue +31 -0
- package/dist/runtime/client/components/ProjectLogo.vue.d.ts +3 -0
- package/dist/runtime/client/components/ReferenceContent.d.ts +26 -0
- package/dist/runtime/client/components/ReferenceContent.js +73 -0
- package/dist/runtime/client/components/TheHeader.d.vue.ts +3 -0
- package/dist/runtime/client/components/TheHeader.vue +53 -16
- package/dist/runtime/client/components/TheHeader.vue.d.ts +2 -2
- package/dist/runtime/client/components/appearance-select.d.ts +17 -0
- package/dist/runtime/client/components/appearance-select.js +15 -0
- package/dist/runtime/client/pages/activity.d.vue.ts +3 -0
- package/dist/runtime/client/pages/activity.vue +202 -0
- package/dist/runtime/client/pages/activity.vue.d.ts +3 -0
- package/dist/runtime/client/pages/context-menus.d.vue.ts +3 -0
- package/dist/runtime/client/pages/context-menus.vue +120 -0
- package/dist/runtime/client/pages/context-menus.vue.d.ts +3 -0
- package/dist/runtime/client/pages/listeners.d.vue.ts +3 -0
- package/dist/runtime/client/pages/listeners.vue +68 -0
- package/dist/runtime/client/pages/listeners.vue.d.ts +3 -0
- package/dist/runtime/client/pages/overview.d.vue.ts +3 -0
- package/dist/runtime/client/pages/overview.vue +280 -0
- package/dist/runtime/client/pages/overview.vue.d.ts +3 -0
- package/dist/runtime/client/pages/slash-commands.d.vue.ts +3 -0
- package/dist/runtime/client/pages/slash-commands.vue +185 -359
- package/dist/runtime/client/pages/slash-commands.vue.d.ts +2 -3
- package/dist/runtime/client/reference.css +46 -0
- package/dist/runtime/client/style.css +4 -1
- package/dist/runtime/client/useActivityLog.d.ts +7 -0
- package/dist/runtime/client/useActivityLog.js +76 -0
- package/dist/runtime/client/useCommandRegistry.d.ts +7 -0
- package/dist/runtime/client/useCommandRegistry.js +34 -0
- package/dist/runtime/client/useDashboardCatalog.d.ts +5 -0
- package/dist/runtime/client/useDashboardCatalog.js +9 -0
- package/dist/runtime/client/useDiscordCommandReference.d.ts +2 -0
- package/dist/runtime/client/useDiscordCommandReference.js +6 -0
- package/dist/runtime/dashboard/auth.d.ts +4 -0
- package/dist/runtime/dashboard/auth.js +55 -0
- package/dist/runtime/dashboard/oauth.d.ts +17 -0
- package/dist/runtime/dashboard/oauth.js +172 -0
- package/dist/runtime/dashboard/origin.d.ts +3 -0
- package/dist/runtime/dashboard/origin.js +15 -0
- package/dist/runtime/dashboard/permissions.d.ts +4 -0
- package/dist/runtime/dashboard/permissions.js +84 -0
- package/dist/runtime/dashboard/signin.d.ts +3 -0
- package/dist/runtime/dashboard/signin.js +42 -0
- package/dist/runtime/diagnostics.d.ts +4 -0
- package/dist/runtime/diagnostics.js +24 -0
- package/dist/runtime/discordInvocation.d.ts +14 -0
- package/dist/runtime/discordInvocation.js +28 -0
- package/dist/runtime/middleware.d.ts +1 -0
- package/dist/runtime/middleware.js +12 -0
- package/dist/runtime/reference/access.d.ts +6 -0
- package/dist/runtime/reference/access.js +143 -0
- package/dist/runtime/reference/catalog.d.ts +2 -0
- package/dist/runtime/reference/catalog.js +9 -0
- package/dist/runtime/reference/document.d.ts +2 -0
- package/dist/runtime/reference/document.js +22 -0
- package/dist/runtime/reference/hosted.d.ts +2 -0
- package/dist/runtime/reference/hosted.js +16 -0
- package/dist/runtime/reference/oauth.d.ts +2 -0
- package/dist/runtime/reference/oauth.js +4 -0
- package/dist/runtime/registration.d.ts +65 -0
- package/dist/runtime/registration.js +354 -0
- package/dist/runtime/server/api/discord/activity.get.d.ts +2 -0
- package/dist/runtime/server/api/discord/activity.get.js +6 -0
- package/dist/runtime/server/api/discord/catalog.get.d.ts +2 -0
- package/dist/runtime/server/api/discord/catalog.get.js +3 -0
- package/dist/runtime/server/api/discord/slash-command/autocomplete.post.d.ts +2 -0
- package/dist/runtime/server/api/discord/slash-command/autocomplete.post.js +14 -0
- package/dist/runtime/server/api/discord/slash-command/register.post.d.ts +1 -1
- package/dist/runtime/server/api/discord/slash-command/register.post.js +1 -1
- package/dist/runtime/server/api/discord/slash-command/remote-all.get.d.ts +1 -1
- package/dist/runtime/server/api/discord/slash-command/remote-diff.post.d.ts +1 -238
- package/dist/runtime/server/api/discord/slash-command/remote-diff.post.js +3 -1
- package/dist/runtime/server/api/discord/slash-command/test.post.d.ts +20 -0
- package/dist/runtime/server/api/discord/slash-command/test.post.js +19 -0
- package/dist/runtime/server/plugins/discord.js +95 -31
- package/dist/runtime/server/utils/client.d.ts +59 -246
- package/dist/runtime/server/utils/client.js +413 -451
- package/dist/runtime/server/utils/defineContextMenu.d.ts +49 -0
- package/dist/runtime/server/utils/defineContextMenu.js +12 -0
- package/dist/runtime/server/utils/defineListener.d.ts +24 -0
- package/dist/runtime/server/utils/defineListener.js +7 -0
- package/dist/runtime/server/utils/defineMiddleware.d.ts +29 -0
- package/dist/runtime/server/utils/defineMiddleware.js +24 -0
- package/dist/runtime/server/utils/describeCommand.d.ts +2 -0
- package/dist/runtime/server/utils/describeOption.d.ts +1 -1
- package/dist/runtime/server/utils/messageSender.d.ts +37 -0
- package/dist/runtime/server/utils/messageSender.js +149 -0
- package/dist/runtime/server/utils/middleware/cooldown.d.ts +1 -0
- package/dist/runtime/server/utils/middleware/cooldown.js +39 -0
- package/dist/runtime/server/utils/middleware/guildOnly.d.ts +1 -0
- package/dist/runtime/server/utils/middleware/guildOnly.js +6 -0
- package/dist/runtime/server/utils/middleware/ownerOnly.d.ts +1 -0
- package/dist/runtime/server/utils/middleware/ownerOnly.js +10 -0
- package/dist/runtime/server/utils/middleware/requireRole.d.ts +1 -0
- package/dist/runtime/server/utils/middleware/requireRole.js +15 -0
- package/dist/runtime/server/utils/reply.d.ts +13 -3
- package/dist/runtime/server/utils/reply.js +111 -162
- package/dist/runtime/server/utils/simulateInteraction.d.ts +20 -0
- package/dist/runtime/server/utils/simulateInteraction.js +127 -0
- package/dist/runtime/server/utils/useTextChannel.d.ts +56 -0
- package/dist/runtime/server/utils/useTextChannel.js +105 -0
- package/dist/types.d.mts +11 -1
- package/dist/types.d.ts +11 -1
- package/package.json +62 -44
- package/dist/runtime/client/components/TheHeader.css +0 -1
- package/dist/runtime/client/pages/slash-commands.css +0 -1
- package/dist/runtime/client/uno.config.d.ts +0 -2
- package/dist/runtime/client/uno.config.js +0 -10
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import TheHeader from "../components/TheHeader.vue";
|
|
3
|
+
import { useDashboardCatalog } from "../useDashboardCatalog";
|
|
4
|
+
const showEditorLinks = import.meta.dev;
|
|
5
|
+
const { listeners: eventListeners } = useDashboardCatalog();
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<template>
|
|
9
|
+
<div class="bg-default min-h-screen">
|
|
10
|
+
<TheHeader />
|
|
11
|
+
|
|
12
|
+
<main id="discord-main" tabindex="-1" class="mx-auto px-6 py-8 max-w-6xl">
|
|
13
|
+
<div class="mb-8">
|
|
14
|
+
<h1 class="text-2xl tracking-tight font-bold">
|
|
15
|
+
Event Listeners
|
|
16
|
+
</h1>
|
|
17
|
+
<p class="text-muted text-sm mt-1">
|
|
18
|
+
{{ eventListeners.length }} listener{{ eventListeners.length === 1 ? "" : "s" }} registered
|
|
19
|
+
</p>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<USeparator class="mb-8" />
|
|
23
|
+
|
|
24
|
+
<div v-if="eventListeners.length > 0" class="space-y-3">
|
|
25
|
+
<UCard
|
|
26
|
+
v-for="listener in eventListeners"
|
|
27
|
+
:key="listener.path"
|
|
28
|
+
variant="outline"
|
|
29
|
+
>
|
|
30
|
+
<template #header>
|
|
31
|
+
<div class="flex items-center justify-between gap-4">
|
|
32
|
+
<div class="flex items-center gap-2.5 min-w-0">
|
|
33
|
+
<div class="flex size-7 shrink-0 items-center justify-center rounded-md bg-amber-500/10 text-amber-500">
|
|
34
|
+
<svg class="size-3.5" viewBox="0 0 20 20" fill="currentColor">
|
|
35
|
+
<path d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" />
|
|
36
|
+
</svg>
|
|
37
|
+
</div>
|
|
38
|
+
<code class="text-highlighted text-base font-semibold">{{ listener.event }}</code>
|
|
39
|
+
<UBadge v-if="listener.once" label="once" color="warning" variant="subtle" size="xs" />
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
<template v-if="showEditorLinks" #footer>
|
|
44
|
+
<a
|
|
45
|
+
:href="`vscode://file${listener.path}`"
|
|
46
|
+
class="text-dimmed text-xs font-mono truncate hover:text-highlighted transition-colors"
|
|
47
|
+
>{{ listener.path.split("/discord/listeners/").pop() }}</a>
|
|
48
|
+
</template>
|
|
49
|
+
</UCard>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<!-- Empty state -->
|
|
53
|
+
<div v-else class="py-20 text-center flex flex-col items-center justify-center">
|
|
54
|
+
<div class="bg-elevated mb-4 rounded-2xl flex size-16 items-center justify-center">
|
|
55
|
+
<svg class="size-7 text-muted" viewBox="0 0 20 20" fill="currentColor">
|
|
56
|
+
<path d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" />
|
|
57
|
+
</svg>
|
|
58
|
+
</div>
|
|
59
|
+
<h3 class="text-lg font-semibold">
|
|
60
|
+
No listeners yet
|
|
61
|
+
</h3>
|
|
62
|
+
<p class="text-muted text-sm mt-1 max-w-sm">
|
|
63
|
+
Create a file in <code class="bg-elevated text-xs px-1.5 py-0.5 rounded">discord/listeners/</code> to get started.
|
|
64
|
+
</p>
|
|
65
|
+
</div>
|
|
66
|
+
</main>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "#imports";
|
|
3
|
+
import TheHeader from "../components/TheHeader.vue";
|
|
4
|
+
import { useCommandRegistry } from "../useCommandRegistry";
|
|
5
|
+
import { useDashboardCatalog } from "../useDashboardCatalog";
|
|
6
|
+
const { commands, diff, status } = useCommandRegistry();
|
|
7
|
+
const { menus, listeners: eventListeners } = useDashboardCatalog();
|
|
8
|
+
const commandStats = computed(() => {
|
|
9
|
+
if (!diff.value)
|
|
10
|
+
return null;
|
|
11
|
+
return {
|
|
12
|
+
menuChanges: diff.value.menuChanges,
|
|
13
|
+
added: diff.value.added.length,
|
|
14
|
+
changed: diff.value.changed.length,
|
|
15
|
+
removed: diff.value.removed.length,
|
|
16
|
+
conflict: diff.value.conflict.length
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
const allSynced = computed(() => {
|
|
20
|
+
if (!commandStats.value)
|
|
21
|
+
return false;
|
|
22
|
+
return commandStats.value.added === 0 && commandStats.value.changed === 0 && commandStats.value.removed === 0 && commandStats.value.conflict === 0 && commandStats.value.menuChanges === 0;
|
|
23
|
+
});
|
|
24
|
+
const userMenus = computed(() => menus.value.filter((m) => m.type === "user"));
|
|
25
|
+
const messageMenus = computed(() => menus.value.filter((m) => m.type === "message"));
|
|
26
|
+
const uniqueEvents = computed(() => {
|
|
27
|
+
const events = new Set(eventListeners.value.map((l) => l.event));
|
|
28
|
+
return events.size;
|
|
29
|
+
});
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<div class="bg-default min-h-screen">
|
|
34
|
+
<TheHeader />
|
|
35
|
+
|
|
36
|
+
<main id="discord-main" tabindex="-1" class="mx-auto px-6 py-8 max-w-6xl">
|
|
37
|
+
<!-- Hero -->
|
|
38
|
+
<div class="mb-10 relative overflow-hidden rounded-xl border border-default bg-elevated px-6 py-8">
|
|
39
|
+
<div class="absolute inset-0 bg-linear-to-br from-[#00DC82]/5 via-transparent to-[#5865F2]/5" />
|
|
40
|
+
<div class="relative">
|
|
41
|
+
<h1 class="text-3xl tracking-tight font-bold">
|
|
42
|
+
Dashboard
|
|
43
|
+
</h1>
|
|
44
|
+
<p class="text-muted text-sm mt-1">
|
|
45
|
+
Overview of your Discord bot configuration
|
|
46
|
+
</p>
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- Stat cards -->
|
|
51
|
+
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4 mb-10">
|
|
52
|
+
<!-- Slash Commands -->
|
|
53
|
+
<NuxtLink to="/discord/slash-commands" class="group">
|
|
54
|
+
<UCard variant="outline" class="transition-colors group-hover:border-[#5865F2]/60">
|
|
55
|
+
<div class="flex items-start justify-between">
|
|
56
|
+
<div>
|
|
57
|
+
<p class="text-muted text-xs font-medium uppercase tracking-wider">
|
|
58
|
+
Slash Commands
|
|
59
|
+
</p>
|
|
60
|
+
<p class="text-3xl font-bold mt-1.5 text-highlighted">
|
|
61
|
+
{{ commands.length }}
|
|
62
|
+
</p>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-[#5865F2]/10 text-[#5865F2]">
|
|
65
|
+
<span class="text-lg font-bold">/</span>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
<div class="mt-3 flex flex-wrap gap-1.5">
|
|
69
|
+
<UBadge v-if="!commandStats" color="neutral" variant="subtle" size="xs">
|
|
70
|
+
{{ status === "pending" ? "Checking Discord\u2026" : "Sync status unknown" }}
|
|
71
|
+
</UBadge>
|
|
72
|
+
<template v-else-if="!allSynced">
|
|
73
|
+
<UBadge v-if="commandStats.menuChanges" color="warning" variant="subtle" size="xs">
|
|
74
|
+
Context menu changes are ready to sync.
|
|
75
|
+
</UBadge>
|
|
76
|
+
<UBadge v-if="commandStats.added" color="success" variant="subtle" size="xs">
|
|
77
|
+
{{ commandStats.added }} new
|
|
78
|
+
</UBadge>
|
|
79
|
+
<UBadge v-if="commandStats.changed" color="warning" variant="subtle" size="xs">
|
|
80
|
+
{{ commandStats.changed }} changed
|
|
81
|
+
</UBadge>
|
|
82
|
+
<UBadge v-if="commandStats.removed" color="neutral" variant="subtle" size="xs">
|
|
83
|
+
{{ commandStats.removed }} removed
|
|
84
|
+
</UBadge>
|
|
85
|
+
<UBadge v-if="commandStats.conflict" color="error" variant="subtle" size="xs">
|
|
86
|
+
{{ commandStats.conflict }} conflict
|
|
87
|
+
</UBadge>
|
|
88
|
+
</template>
|
|
89
|
+
<UBadge v-else color="success" variant="subtle" size="xs">
|
|
90
|
+
synced
|
|
91
|
+
</UBadge>
|
|
92
|
+
</div>
|
|
93
|
+
</UCard>
|
|
94
|
+
</NuxtLink>
|
|
95
|
+
|
|
96
|
+
<!-- Context Menus -->
|
|
97
|
+
<NuxtLink to="/discord/context-menus" class="group">
|
|
98
|
+
<UCard variant="outline" class="transition-colors group-hover:border-[#00DC82]/60">
|
|
99
|
+
<div class="flex items-start justify-between">
|
|
100
|
+
<div>
|
|
101
|
+
<p class="text-muted text-xs font-medium uppercase tracking-wider">
|
|
102
|
+
Context Menus
|
|
103
|
+
</p>
|
|
104
|
+
<p class="text-3xl font-bold mt-1.5 text-highlighted">
|
|
105
|
+
{{ menus.length }}
|
|
106
|
+
</p>
|
|
107
|
+
</div>
|
|
108
|
+
<div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-[#00DC82]/10 text-[#00DC82]">
|
|
109
|
+
<svg class="size-5" viewBox="0 0 20 20" fill="currentColor">
|
|
110
|
+
<path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V5zm0 4a1 1 0 011-1h12a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1V9zm0 4a1 1 0 011-1h6a1 1 0 011 1v2a1 1 0 01-1 1H4a1 1 0 01-1-1v-2z" clip-rule="evenodd" />
|
|
111
|
+
</svg>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<div class="mt-3 flex flex-wrap gap-1.5">
|
|
115
|
+
<UBadge v-if="userMenus.length" color="info" variant="subtle" size="xs">
|
|
116
|
+
{{ userMenus.length }} user
|
|
117
|
+
</UBadge>
|
|
118
|
+
<UBadge v-if="messageMenus.length" color="secondary" variant="subtle" size="xs">
|
|
119
|
+
{{ messageMenus.length }} message
|
|
120
|
+
</UBadge>
|
|
121
|
+
<span v-if="menus.length === 0" class="text-dimmed text-xs">none defined</span>
|
|
122
|
+
</div>
|
|
123
|
+
</UCard>
|
|
124
|
+
</NuxtLink>
|
|
125
|
+
|
|
126
|
+
<!-- Event Listeners -->
|
|
127
|
+
<NuxtLink to="/discord/listeners" class="group">
|
|
128
|
+
<UCard variant="outline" class="transition-colors group-hover:border-amber-500/60">
|
|
129
|
+
<div class="flex items-start justify-between">
|
|
130
|
+
<div>
|
|
131
|
+
<p class="text-muted text-xs font-medium uppercase tracking-wider">
|
|
132
|
+
Event Listeners
|
|
133
|
+
</p>
|
|
134
|
+
<p class="text-3xl font-bold mt-1.5 text-highlighted">
|
|
135
|
+
{{ eventListeners.length }}
|
|
136
|
+
</p>
|
|
137
|
+
</div>
|
|
138
|
+
<div class="flex size-10 shrink-0 items-center justify-center rounded-lg bg-amber-500/10 text-amber-500">
|
|
139
|
+
<svg class="size-5" viewBox="0 0 20 20" fill="currentColor">
|
|
140
|
+
<path d="M11.3 1.046A1 1 0 0112 2v5h4a1 1 0 01.82 1.573l-7 10A1 1 0 018 18v-5H4a1 1 0 01-.82-1.573l7-10a1 1 0 011.12-.38z" />
|
|
141
|
+
</svg>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
<div class="mt-3 flex flex-wrap gap-1.5">
|
|
145
|
+
<UBadge v-if="uniqueEvents" color="warning" variant="subtle" size="xs">
|
|
146
|
+
{{ uniqueEvents }} event{{ uniqueEvents === 1 ? "" : "s" }}
|
|
147
|
+
</UBadge>
|
|
148
|
+
<UBadge
|
|
149
|
+
v-if="eventListeners.some((l) => l.once)"
|
|
150
|
+
color="neutral" variant="subtle" size="xs"
|
|
151
|
+
>
|
|
152
|
+
{{ eventListeners.filter((l) => l.once).length }} once
|
|
153
|
+
</UBadge>
|
|
154
|
+
<span v-if="eventListeners.length === 0" class="text-dimmed text-xs">none defined</span>
|
|
155
|
+
</div>
|
|
156
|
+
</UCard>
|
|
157
|
+
</NuxtLink>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
<USeparator class="mb-8" />
|
|
161
|
+
|
|
162
|
+
<!-- Quick lists -->
|
|
163
|
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
|
|
164
|
+
<!-- Commands list -->
|
|
165
|
+
<div>
|
|
166
|
+
<div class="flex items-center justify-between mb-3">
|
|
167
|
+
<h2 class="text-sm font-semibold uppercase tracking-wider text-muted">
|
|
168
|
+
Commands
|
|
169
|
+
</h2>
|
|
170
|
+
<NuxtLink to="/discord/slash-commands" class="text-xs text-primary hover:underline">
|
|
171
|
+
View all
|
|
172
|
+
</NuxtLink>
|
|
173
|
+
</div>
|
|
174
|
+
<UCard variant="outline" :ui="{ body: 'p-0!' }">
|
|
175
|
+
<div v-if="commands.length === 0" class="p-6 text-center text-dimmed text-sm">
|
|
176
|
+
No commands defined
|
|
177
|
+
</div>
|
|
178
|
+
<div v-else class="divide-y divide-default">
|
|
179
|
+
<div
|
|
180
|
+
v-for="cmd in commands.slice(0, 8)"
|
|
181
|
+
:key="cmd.name"
|
|
182
|
+
class="flex items-center justify-between px-4 py-2.5"
|
|
183
|
+
>
|
|
184
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
185
|
+
<code class="text-highlighted text-sm font-medium">/{{ cmd.name }}</code>
|
|
186
|
+
<span class="text-dimmed text-xs truncate">{{ cmd.description }}</span>
|
|
187
|
+
</div>
|
|
188
|
+
<div class="flex shrink-0 gap-1.5">
|
|
189
|
+
<UBadge
|
|
190
|
+
v-if="cmd.options.length"
|
|
191
|
+
:label="`${cmd.options.length} opt`"
|
|
192
|
+
color="neutral" variant="subtle" size="xs"
|
|
193
|
+
/>
|
|
194
|
+
<UBadge
|
|
195
|
+
v-if="'subcommands' in cmd && cmd.subcommands?.length"
|
|
196
|
+
:label="`${cmd.subcommands.length} sub`"
|
|
197
|
+
color="info" variant="subtle" size="xs"
|
|
198
|
+
/>
|
|
199
|
+
</div>
|
|
200
|
+
</div>
|
|
201
|
+
<div v-if="commands.length > 8" class="px-4 py-2 text-center">
|
|
202
|
+
<NuxtLink to="/discord/slash-commands" class="text-xs text-primary hover:underline">
|
|
203
|
+
+{{ commands.length - 8 }} more
|
|
204
|
+
</NuxtLink>
|
|
205
|
+
</div>
|
|
206
|
+
</div>
|
|
207
|
+
</UCard>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<!-- Right column: context menus + listeners -->
|
|
211
|
+
<div class="space-y-6">
|
|
212
|
+
<!-- Context Menus -->
|
|
213
|
+
<div>
|
|
214
|
+
<div class="flex items-center justify-between mb-3">
|
|
215
|
+
<h2 class="text-sm font-semibold uppercase tracking-wider text-muted">
|
|
216
|
+
Context Menus
|
|
217
|
+
</h2>
|
|
218
|
+
<NuxtLink to="/discord/context-menus" class="text-xs text-primary hover:underline">
|
|
219
|
+
View all
|
|
220
|
+
</NuxtLink>
|
|
221
|
+
</div>
|
|
222
|
+
<UCard variant="outline" :ui="{ body: 'p-0!' }">
|
|
223
|
+
<div v-if="menus.length === 0" class="p-6 text-center text-dimmed text-sm">
|
|
224
|
+
No context menus defined
|
|
225
|
+
</div>
|
|
226
|
+
<div v-else class="divide-y divide-default">
|
|
227
|
+
<div
|
|
228
|
+
v-for="menu in menus"
|
|
229
|
+
:key="JSON.stringify([menu.type, menu.name, menu.guilds])"
|
|
230
|
+
class="flex items-center justify-between px-4 py-2.5"
|
|
231
|
+
>
|
|
232
|
+
<span class="text-highlighted text-sm font-medium">{{ menu.name }}</span>
|
|
233
|
+
<UBadge
|
|
234
|
+
:label="menu.type"
|
|
235
|
+
:color="menu.type === 'user' ? 'info' : 'secondary'"
|
|
236
|
+
variant="subtle" size="xs"
|
|
237
|
+
/>
|
|
238
|
+
</div>
|
|
239
|
+
</div>
|
|
240
|
+
</UCard>
|
|
241
|
+
</div>
|
|
242
|
+
|
|
243
|
+
<!-- Listeners -->
|
|
244
|
+
<div>
|
|
245
|
+
<div class="flex items-center justify-between mb-3">
|
|
246
|
+
<h2 class="text-sm font-semibold uppercase tracking-wider text-muted">
|
|
247
|
+
Event Listeners
|
|
248
|
+
</h2>
|
|
249
|
+
<NuxtLink to="/discord/listeners" class="text-xs text-primary hover:underline">
|
|
250
|
+
View all
|
|
251
|
+
</NuxtLink>
|
|
252
|
+
</div>
|
|
253
|
+
<UCard variant="outline" :ui="{ body: 'p-0!' }">
|
|
254
|
+
<div v-if="eventListeners.length === 0" class="p-6 text-center text-dimmed text-sm">
|
|
255
|
+
No listeners defined
|
|
256
|
+
</div>
|
|
257
|
+
<div v-else class="divide-y divide-default">
|
|
258
|
+
<div
|
|
259
|
+
v-for="listener in eventListeners"
|
|
260
|
+
:key="listener.path"
|
|
261
|
+
class="flex items-center justify-between px-4 py-2.5"
|
|
262
|
+
>
|
|
263
|
+
<div class="flex items-center gap-2 min-w-0">
|
|
264
|
+
<code class="text-highlighted text-sm font-medium">{{ listener.event }}</code>
|
|
265
|
+
<span class="text-dimmed text-xs truncate font-mono">{{ listener.path.split("/discord/listeners/").pop() }}</span>
|
|
266
|
+
</div>
|
|
267
|
+
<UBadge
|
|
268
|
+
v-if="listener.once"
|
|
269
|
+
label="once"
|
|
270
|
+
color="warning" variant="subtle" size="xs"
|
|
271
|
+
/>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</UCard>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
</main>
|
|
279
|
+
</div>
|
|
280
|
+
</template>
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|