djs-builder 0.6.4 → 0.6.5
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 +8 -8
- package/package.json +1 -1
package/handler/starter.js
CHANGED
|
@@ -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.
|
|
129
|
-
event.
|
|
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.
|
|
137
|
-
event.
|
|
136
|
+
} else if (typeof event.execute === "function") {
|
|
137
|
+
event.execute(...args, client);
|
|
138
138
|
}
|
|
139
139
|
});
|
|
140
140
|
}
|
|
@@ -207,8 +207,8 @@ async function starter(client, options) {
|
|
|
207
207
|
try {
|
|
208
208
|
if (typeof command.run === "function") {
|
|
209
209
|
await command.run(client ,message, args);
|
|
210
|
-
} else if (typeof command.
|
|
211
|
-
await command.
|
|
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);
|
|
@@ -288,8 +288,8 @@ async function starter(client, options) {
|
|
|
288
288
|
try {
|
|
289
289
|
if (typeof command.run === "function") {
|
|
290
290
|
await command.run(interaction, client);
|
|
291
|
-
} else if (typeof command.
|
|
292
|
-
await command.
|
|
291
|
+
} else if (typeof command.execute === "function") {
|
|
292
|
+
await command.execute(interaction, client);
|
|
293
293
|
}
|
|
294
294
|
} catch (error) {
|
|
295
295
|
console.error(error);
|