djs-builder 0.6.4 → 0.6.6

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.
Files changed (2) hide show
  1. package/handler/starter.js +10 -10
  2. package/package.json +1 -1
@@ -125,16 +125,16 @@ async function starter(client, options) {
125
125
  client.once(event.name, (...args) => {
126
126
  if (typeof event.run === "function") {
127
127
  event.run(...args);
128
- } else if (typeof event.exports === "function") {
129
- event.exports(...args);
128
+ } else if (typeof event.execute === "function") {
129
+ event.execute(...args);
130
130
  }
131
131
  });
132
132
  } else {
133
133
  client.on(event.name, (...args) => {
134
134
  if (typeof event.run === "function") {
135
135
  event.run(...args, client);
136
- } else if (typeof event.exports === "function") {
137
- event.exports(...args, client);
136
+ } else if (typeof event.execute === "function") {
137
+ event.execute(...args, client);
138
138
  }
139
139
  });
140
140
  }
@@ -201,14 +201,14 @@ async function starter(client, options) {
201
201
  const args = content.split(/\s+/).slice(1);
202
202
 
203
203
  if (options.prefix.log) {
204
- await cmd_log(client, message, command.name, message.channel.id);
204
+ await cmd_log(client, message, command.name, options.prefix.log);
205
205
  }
206
206
 
207
207
  try {
208
208
  if (typeof command.run === "function") {
209
209
  await command.run(client ,message, args);
210
- } else if (typeof command.exports === "function") {
211
- await command.exports(client, message, args);
210
+ } else if (typeof command.execute === "function") {
211
+ await command.execute(client, message, args);
212
212
  }
213
213
  } catch (e) {
214
214
  console.error(`❌ Error in command ${command.name}:`, e);
@@ -283,13 +283,13 @@ async function starter(client, options) {
283
283
  }
284
284
 
285
285
  if (options.slash.log) {
286
- await cmd_log(client, interaction, command.name, interaction.channelId);
286
+ await cmd_log(client, interaction, command.name, options.slash.log);
287
287
  }
288
288
  try {
289
289
  if (typeof command.run === "function") {
290
290
  await command.run(interaction, client);
291
- } else if (typeof command.exports === "function") {
292
- await command.exports(interaction, client);
291
+ } else if (typeof command.execute === "function") {
292
+ await command.execute(interaction, client);
293
293
  }
294
294
  } catch (error) {
295
295
  console.error(error);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
 
2
2
  {
3
3
  "name": "djs-builder",
4
- "version": "0.6.4",
4
+ "version": "0.6.6",
5
5
  "description": "Discord.js bot builder. Supports Ts and Js.",
6
6
  "main": "handler/starter.js",
7
7
  "dependencies": {