djs-builder 0.7.10 → 0.7.11
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/function/function.js +10 -10
- package/function/level.js +2 -2
- package/package.json +2 -2
package/function/function.js
CHANGED
|
@@ -348,9 +348,9 @@ async function CreateModal(options) {
|
|
|
348
348
|
|
|
349
349
|
//////////////////////////////////* components creat 🔩
|
|
350
350
|
|
|
351
|
-
async function CreateComponents(
|
|
351
|
+
async function CreateComponents(container, components) {
|
|
352
352
|
let result;
|
|
353
|
-
if (
|
|
353
|
+
if (container === true) {
|
|
354
354
|
result = new ContainerBuilder();
|
|
355
355
|
} else {
|
|
356
356
|
result = [];
|
|
@@ -360,7 +360,7 @@ async function CreateComponents(type, components) {
|
|
|
360
360
|
if (item.type === "text") {
|
|
361
361
|
const text = new TextDisplayBuilder().setContent(item.content);
|
|
362
362
|
|
|
363
|
-
if (
|
|
363
|
+
if (container !== true) {
|
|
364
364
|
result.push(text);
|
|
365
365
|
} else {
|
|
366
366
|
result.addTextDisplayComponents(text);
|
|
@@ -371,7 +371,7 @@ async function CreateComponents(type, components) {
|
|
|
371
371
|
);
|
|
372
372
|
if (item.spacing) separator.setSpacing(item.spacing);
|
|
373
373
|
|
|
374
|
-
if (
|
|
374
|
+
if (container === true) {
|
|
375
375
|
result.addSeparatorComponents(separator);
|
|
376
376
|
} else {
|
|
377
377
|
result.push(separator);
|
|
@@ -389,7 +389,7 @@ async function CreateComponents(type, components) {
|
|
|
389
389
|
}
|
|
390
390
|
});
|
|
391
391
|
const media = new MediaGalleryBuilder().addItems(items);
|
|
392
|
-
if (
|
|
392
|
+
if (container === true) {
|
|
393
393
|
result.addMediaGalleryComponents(media);
|
|
394
394
|
} else {
|
|
395
395
|
result.push(media);
|
|
@@ -397,14 +397,14 @@ async function CreateComponents(type, components) {
|
|
|
397
397
|
} else if (item.type === "file") {
|
|
398
398
|
const file = new FileBuilder().setURL(item.url);
|
|
399
399
|
if (item.spoiler) file.setSpoiler(true);
|
|
400
|
-
if (
|
|
400
|
+
if (container === true) {
|
|
401
401
|
result.addFileComponents(file);
|
|
402
402
|
} else {
|
|
403
403
|
result.push(file);
|
|
404
404
|
}
|
|
405
405
|
} else if (item.type === "button") {
|
|
406
406
|
const but = await CreateRow([item.components]);
|
|
407
|
-
if (
|
|
407
|
+
if (container === true) {
|
|
408
408
|
result.addActionRowComponents(but);
|
|
409
409
|
} else {
|
|
410
410
|
result.push(but);
|
|
@@ -419,7 +419,7 @@ async function CreateComponents(type, components) {
|
|
|
419
419
|
options: options,
|
|
420
420
|
},
|
|
421
421
|
]);
|
|
422
|
-
if (
|
|
422
|
+
if (container === true) {
|
|
423
423
|
result.addActionRowComponents(menu);
|
|
424
424
|
} else {
|
|
425
425
|
result.push(menu);
|
|
@@ -453,7 +453,7 @@ async function CreateComponents(type, components) {
|
|
|
453
453
|
}
|
|
454
454
|
}
|
|
455
455
|
|
|
456
|
-
if (
|
|
456
|
+
if (container === true) {
|
|
457
457
|
result.addSectionComponents(section);
|
|
458
458
|
} else {
|
|
459
459
|
result.push(section);
|
|
@@ -461,7 +461,7 @@ async function CreateComponents(type, components) {
|
|
|
461
461
|
}
|
|
462
462
|
});
|
|
463
463
|
|
|
464
|
-
if (
|
|
464
|
+
if (container === true) {
|
|
465
465
|
return [result];
|
|
466
466
|
} else {
|
|
467
467
|
return [...result];
|
package/function/level.js
CHANGED
|
@@ -26,8 +26,8 @@ const guildSchema = new Schema({
|
|
|
26
26
|
guildId: { type: String, required: true, unique: true },
|
|
27
27
|
initialized: { type: Boolean, default: false },
|
|
28
28
|
|
|
29
|
-
minXP: { type: Number, default:
|
|
30
|
-
maxXP: { type: Number, default:
|
|
29
|
+
minXP: { type: Number, default: 3 },
|
|
30
|
+
maxXP: { type: Number, default: 8 },
|
|
31
31
|
xpMultiplier: { type: Number, default: 1 },
|
|
32
32
|
maxLevel: { type: Number, default: null },
|
|
33
33
|
cooldown: { type: Number, default: 0 },
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "djs-builder",
|
|
3
|
-
"version": "0.7.
|
|
4
|
-
"note": "🎉 Package Update v0.7.
|
|
3
|
+
"version": "0.7.11",
|
|
4
|
+
"note": "🎉 Package Update v0.7.11! \n\n- 🎮 NEW: setLevel Function!\n • All-in-one level system setup\n • Automatic message listener\n • Callbacks: onLevelUp, onRoleReward, onXP\n • Dashboard Mode & Code Mode support\n • Auto role rewards on level up\n • Voice XP support via addVoiceXP\n\n- 📊 Level System Improvements!\n • getGuildConfig with full output example\n • updateGuildConfig for programmatic changes\n • XP Calculation Types: line, exponential, balanced, custom\n • Cooldown & Blacklist support\n\n- 🌐 Dashboard System!\n • Discord OAuth2 Login\n • Server, Level, Giveaway & Blacklist Management\n • Logs Management Page\n\n- <:npm:1107014411375353968> Learn more on [NPM](https://www.npmjs.com/package/djs-builder)\n- <:Discord:906936109114753024> DISCORD SERVER : [LINK](https://discord.gg/uYcKCZk3)",
|
|
5
5
|
"description": "🎉 Full-featured Discord.js utilities: CreateComponents, CreateModal, Dashboard, Logging & more! 🥏",
|
|
6
6
|
"main": "handler/starter.js",
|
|
7
7
|
"dependencies": {
|