@spatulox/simplediscordbot 1.0.37 → 1.0.39
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/dist/index.js +11 -15
- package/dist/index.mjs +11 -15
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -552,7 +552,7 @@ var EmbedManager = class {
|
|
|
552
552
|
* Creates a simply description embed
|
|
553
553
|
*/
|
|
554
554
|
static description(description) {
|
|
555
|
-
return this.create().setDescription(description).setFooter(null);
|
|
555
|
+
return this.create().setDescription(description).setFooter(null).setTimestamp(null);
|
|
556
556
|
}
|
|
557
557
|
/**
|
|
558
558
|
* Creates debug embed
|
|
@@ -641,20 +641,16 @@ var SendableComponentBuilder = class {
|
|
|
641
641
|
}
|
|
642
642
|
return base;
|
|
643
643
|
}
|
|
644
|
-
static buildInteraction(
|
|
644
|
+
/*static buildInteraction (content: string, epheremal?: boolean): InteractionReplyOptions | InteractionUpdateOptions;
|
|
645
|
+
static buildInteraction (component: SendableComponent | SendableComponent[], epheremal?: boolean): InteractionReplyOptions | InteractionUpdateOptions;
|
|
646
|
+
static buildInteraction (content?: string | null, component?: SendableComponent | SendableComponent[] | null, ephemeral?: boolean): InteractionReplyOptions | InteractionUpdateOptions;*/
|
|
647
|
+
static buildInteraction(content, component, ephemeral) {
|
|
645
648
|
let base = {};
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
}
|
|
649
|
-
if (typeof contentOrComponent !== "string" && !component) {
|
|
650
|
-
base = this.build(base, null, contentOrComponent);
|
|
651
|
-
}
|
|
652
|
-
if (contentOrComponent && typeof contentOrComponent === "string" && component) {
|
|
653
|
-
base = this.build(base, contentOrComponent, component);
|
|
654
|
-
}
|
|
655
|
-
if (ephemeral) {
|
|
649
|
+
this.build(base, content, component);
|
|
650
|
+
if (ephemeral || typeof component == "boolean" && component) {
|
|
656
651
|
base.flags = [import_discord3.MessageFlags.Ephemeral];
|
|
657
652
|
}
|
|
653
|
+
console.log(base);
|
|
658
654
|
return base;
|
|
659
655
|
}
|
|
660
656
|
static buildMessage(contentOrComponent, component) {
|
|
@@ -916,7 +912,7 @@ var BotInteraction = class {
|
|
|
916
912
|
static async send(interaction, content, component = false, ephemeral = false) {
|
|
917
913
|
if (!interaction.isRepliable()) return false;
|
|
918
914
|
const options = this.buildReplyOptions(
|
|
919
|
-
typeof content === "string" ? content :
|
|
915
|
+
typeof content === "string" ? content : null,
|
|
920
916
|
typeof content === "string" ? component : content,
|
|
921
917
|
typeof content === "string" ? ephemeral : component
|
|
922
918
|
);
|
|
@@ -2532,7 +2528,7 @@ var SimpleMutex = class {
|
|
|
2532
2528
|
// package.json
|
|
2533
2529
|
var package_default = {
|
|
2534
2530
|
name: "@spatulox/simplediscordbot",
|
|
2535
|
-
version: "1.0.
|
|
2531
|
+
version: "1.0.38",
|
|
2536
2532
|
author: "Spatulox",
|
|
2537
2533
|
description: "Simple discord bot framework to set up a bot under 30 secondes",
|
|
2538
2534
|
exports: {
|
|
@@ -2556,7 +2552,7 @@ var package_default = {
|
|
|
2556
2552
|
},
|
|
2557
2553
|
license: "MIT",
|
|
2558
2554
|
dependencies: {
|
|
2559
|
-
"@spatulox/discord-interaction-manager": "^1.0.
|
|
2555
|
+
"@spatulox/discord-interaction-manager": "^1.0.17",
|
|
2560
2556
|
"discord.js": "^14.25.1"
|
|
2561
2557
|
},
|
|
2562
2558
|
devDependencies: {
|
package/dist/index.mjs
CHANGED
|
@@ -504,7 +504,7 @@ var EmbedManager = class {
|
|
|
504
504
|
* Creates a simply description embed
|
|
505
505
|
*/
|
|
506
506
|
static description(description) {
|
|
507
|
-
return this.create().setDescription(description).setFooter(null);
|
|
507
|
+
return this.create().setDescription(description).setFooter(null).setTimestamp(null);
|
|
508
508
|
}
|
|
509
509
|
/**
|
|
510
510
|
* Creates debug embed
|
|
@@ -600,20 +600,16 @@ var SendableComponentBuilder = class {
|
|
|
600
600
|
}
|
|
601
601
|
return base;
|
|
602
602
|
}
|
|
603
|
-
static buildInteraction(
|
|
603
|
+
/*static buildInteraction (content: string, epheremal?: boolean): InteractionReplyOptions | InteractionUpdateOptions;
|
|
604
|
+
static buildInteraction (component: SendableComponent | SendableComponent[], epheremal?: boolean): InteractionReplyOptions | InteractionUpdateOptions;
|
|
605
|
+
static buildInteraction (content?: string | null, component?: SendableComponent | SendableComponent[] | null, ephemeral?: boolean): InteractionReplyOptions | InteractionUpdateOptions;*/
|
|
606
|
+
static buildInteraction(content, component, ephemeral) {
|
|
604
607
|
let base = {};
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}
|
|
608
|
-
if (typeof contentOrComponent !== "string" && !component) {
|
|
609
|
-
base = this.build(base, null, contentOrComponent);
|
|
610
|
-
}
|
|
611
|
-
if (contentOrComponent && typeof contentOrComponent === "string" && component) {
|
|
612
|
-
base = this.build(base, contentOrComponent, component);
|
|
613
|
-
}
|
|
614
|
-
if (ephemeral) {
|
|
608
|
+
this.build(base, content, component);
|
|
609
|
+
if (ephemeral || typeof component == "boolean" && component) {
|
|
615
610
|
base.flags = [MessageFlags2.Ephemeral];
|
|
616
611
|
}
|
|
612
|
+
console.log(base);
|
|
617
613
|
return base;
|
|
618
614
|
}
|
|
619
615
|
static buildMessage(contentOrComponent, component) {
|
|
@@ -875,7 +871,7 @@ var BotInteraction = class {
|
|
|
875
871
|
static async send(interaction, content, component = false, ephemeral = false) {
|
|
876
872
|
if (!interaction.isRepliable()) return false;
|
|
877
873
|
const options = this.buildReplyOptions(
|
|
878
|
-
typeof content === "string" ? content :
|
|
874
|
+
typeof content === "string" ? content : null,
|
|
879
875
|
typeof content === "string" ? component : content,
|
|
880
876
|
typeof content === "string" ? ephemeral : component
|
|
881
877
|
);
|
|
@@ -2510,7 +2506,7 @@ var SimpleMutex = class {
|
|
|
2510
2506
|
// package.json
|
|
2511
2507
|
var package_default = {
|
|
2512
2508
|
name: "@spatulox/simplediscordbot",
|
|
2513
|
-
version: "1.0.
|
|
2509
|
+
version: "1.0.38",
|
|
2514
2510
|
author: "Spatulox",
|
|
2515
2511
|
description: "Simple discord bot framework to set up a bot under 30 secondes",
|
|
2516
2512
|
exports: {
|
|
@@ -2534,7 +2530,7 @@ var package_default = {
|
|
|
2534
2530
|
},
|
|
2535
2531
|
license: "MIT",
|
|
2536
2532
|
dependencies: {
|
|
2537
|
-
"@spatulox/discord-interaction-manager": "^1.0.
|
|
2533
|
+
"@spatulox/discord-interaction-manager": "^1.0.17",
|
|
2538
2534
|
"discord.js": "^14.25.1"
|
|
2539
2535
|
},
|
|
2540
2536
|
devDependencies: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spatulox/simplediscordbot",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"author": "Spatulox",
|
|
5
5
|
"description": "Simple discord bot framework to set up a bot under 30 secondes",
|
|
6
6
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@spatulox/discord-interaction-manager": "^1.0.
|
|
27
|
+
"@spatulox/discord-interaction-manager": "^1.0.17",
|
|
28
28
|
"discord.js": "^14.25.1"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|