djs-builder 0.6.3 → 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/helper.js +2 -2
- package/handler/starter.js +8 -8
- package/package.json +2 -3
package/handler/helper.js
CHANGED
|
@@ -229,7 +229,7 @@ async function update(client, id, webhookURL) {
|
|
|
229
229
|
const { version, note: localNote } = require("../package.json");
|
|
230
230
|
|
|
231
231
|
const { data } = await axios.get(
|
|
232
|
-
`https://registry.npmjs.org/
|
|
232
|
+
`https://registry.npmjs.org/djs-builder/latest`
|
|
233
233
|
);
|
|
234
234
|
const new_version = data.version;
|
|
235
235
|
const note = data.discription || "";
|
|
@@ -253,7 +253,7 @@ async function update(client, id, webhookURL) {
|
|
|
253
253
|
const embed = new EmbedBuilder()
|
|
254
254
|
.setTitle("🎉 New version available")
|
|
255
255
|
.setDescription(
|
|
256
|
-
`${note}\n\n**Your version:** ${version} ⏰\n**New version:** ${new_version} 🚀\n- Try running \`npm i
|
|
256
|
+
`${note}\n\n**Your version:** ${version} ⏰\n**New version:** ${new_version} 🚀\n- Try running \`npm i djs-builder@latest\` to update. ❤`
|
|
257
257
|
)
|
|
258
258
|
.setColor("Yellow")
|
|
259
259
|
.setTimestamp();
|
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);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
{
|
|
3
3
|
"name": "djs-builder",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.5",
|
|
5
5
|
"description": "Discord.js bot builder. Supports Ts and Js.",
|
|
6
6
|
"main": "handler/starter.js",
|
|
7
7
|
"dependencies": {
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"cli-table3": "^0.6.5",
|
|
11
11
|
"discord-inviter": "^0.9.3",
|
|
12
12
|
"discord.js": "^14.21.0",
|
|
13
|
-
"mongoose": "^8.17.0"
|
|
14
|
-
"testsss-akazaz-lib": "^0.0.13"
|
|
13
|
+
"mongoose": "^8.17.0"
|
|
15
14
|
}
|
|
16
15
|
}
|