@constatic/base 0.0.6 → 0.0.8
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.
|
@@ -18,11 +18,12 @@ class CommandManager extends BaseManager {
|
|
|
18
18
|
if (command.data.autocomplete) {
|
|
19
19
|
this.autocompleteRunners.set(path, command.data.autocomplete);
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const type = command.data.type;
|
|
22
|
+
const [icon, label] = this.getTitle(type);
|
|
22
23
|
this.logs.push([
|
|
23
24
|
styleText("green", `${icon} ${label}`),
|
|
24
25
|
styleText("gray", `>`),
|
|
25
|
-
styleText(["blue", "underline"], command.data.name),
|
|
26
|
+
styleText(["blue", "underline"], (type === ApplicationCommandType.ChatInput ? "/" : "") + command.data.name),
|
|
26
27
|
styleText("green", "✓")
|
|
27
28
|
].join(" "));
|
|
28
29
|
}
|
|
@@ -216,9 +217,7 @@ class CommandManager extends BaseManager {
|
|
|
216
217
|
`${id} guild`
|
|
217
218
|
])));
|
|
218
219
|
}
|
|
219
|
-
|
|
220
|
-
promises.push(setGlobal(globalCommands));
|
|
221
|
-
}
|
|
220
|
+
promises.push(setGlobal(globalCommands));
|
|
222
221
|
} else {
|
|
223
222
|
promises.push(setGlobal(commands));
|
|
224
223
|
client.guilds.cache.forEach((guild) => guild.commands.set([]).catch(() => null));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// src/creators/events/manager.ts
|
|
2
2
|
import { Collection } from "discord.js";
|
|
3
|
+
import { styleText } from "node:util";
|
|
3
4
|
import { BaseManager } from "../manager.js";
|
|
4
5
|
|
|
5
6
|
class EventManager extends BaseManager {
|
|
@@ -16,6 +17,14 @@ class EventManager extends BaseManager {
|
|
|
16
17
|
add(event) {
|
|
17
18
|
const events = this.getEvents(event.data.event);
|
|
18
19
|
events.set(event.data.name, event);
|
|
20
|
+
this.logs.push([
|
|
21
|
+
styleText("yellow", `✦ Event`),
|
|
22
|
+
styleText("gray", `>`),
|
|
23
|
+
styleText(["yellow"], event.data.event),
|
|
24
|
+
styleText("gray", `>`),
|
|
25
|
+
styleText(["blue", "underline"], event.data.name),
|
|
26
|
+
styleText("green", "✓")
|
|
27
|
+
].join(" "));
|
|
19
28
|
}
|
|
20
29
|
async onEvent(event, args) {
|
|
21
30
|
const { middleware, onError } = this.config;
|
package/dist/version.js
CHANGED