djs-builder 0.6.7 → 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,9 +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
- );
109
+ client.slashCommands = new Map(validSlashCommands.map(cmd => [cmd.data.name, cmd]));
110
+ client.slashData = validSlashCommands.map(cmd => cmd.data.toJSON());
111
+
112
+
113
+
112
114
 
113
115
  termenal.slash = validSlashCommands.length;
114
116
  }
@@ -314,6 +316,9 @@ async function starter(client, options) {
314
316
 
315
317
  client.once("ready", async () => {
316
318
  if (ownerId) client.owner = await client.users.fetch(ownerId);
319
+ if (client.slashData?.length) {
320
+ await client.application.commands.set(client.slashData);
321
+ }
317
322
 
318
323
  if (terminal_info) {
319
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.7",
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": {