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.
@@ -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
- client.slashCommands = new Map(
110
- validSlashCommands.map((cmd) => [cmd.data.name, cmd])
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
- await client.application.commands.set(slashData);
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);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "djs-builder",
4
- "version": "0.6.8",
4
+ "version": "0.6.9",
5
5
  "description": "Discord.js bot builder. Supports Ts and Js.",
6
6
  "main": "handler/starter.js",
7
7
  "dependencies": {