djs-builder 0.6.8 → 0.6.9
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/handler/starter.js +6 -6
- package/package.json +1 -1
package/handler/starter.js
CHANGED
|
@@ -106,14 +106,11 @@ async function starter(client, options) {
|
|
|
106
106
|
.filter((cmd) => cmd.data && (typeof cmd.run === "function" || typeof cmd.execute === "function"));
|
|
107
107
|
|
|
108
108
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
);
|
|
112
|
-
|
|
109
|
+
client.slashCommands = new Map(validSlashCommands.map(cmd => [cmd.data.name, cmd]));
|
|
110
|
+
client.slashData = validSlashCommands.map(cmd => cmd.data.toJSON());
|
|
113
111
|
|
|
114
|
-
const slashData = validSlashCommands.map(cmd => cmd.data.toJSON());
|
|
115
112
|
|
|
116
|
-
|
|
113
|
+
|
|
117
114
|
|
|
118
115
|
termenal.slash = validSlashCommands.length;
|
|
119
116
|
}
|
|
@@ -319,6 +316,9 @@ async function starter(client, options) {
|
|
|
319
316
|
|
|
320
317
|
client.once("ready", async () => {
|
|
321
318
|
if (ownerId) client.owner = await client.users.fetch(ownerId);
|
|
319
|
+
if (client.slashData?.length) {
|
|
320
|
+
await client.application.commands.set(client.slashData);
|
|
321
|
+
}
|
|
322
322
|
|
|
323
323
|
if (terminal_info) {
|
|
324
324
|
await terminalInfo(client, options, termenal);
|