@spatulox/simplediscordbot 2.2.1 → 2.2.2

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 CHANGED
@@ -1056,7 +1056,7 @@ var BotInteraction = class {
1056
1056
  // package.json
1057
1057
  var package_default = {
1058
1058
  name: "@spatulox/simplediscordbot",
1059
- version: "2.2.0",
1059
+ version: "2.2.1",
1060
1060
  author: "Spatulox",
1061
1061
  description: "Simple discord bot framework to set up a bot under 30 secondes",
1062
1062
  exports: {
@@ -2916,7 +2916,7 @@ var ComponentManager = class {
2916
2916
  options.value && container.addTextDisplayComponents(new import_discord16.TextDisplayBuilder().setContent(options.value));
2917
2917
  }
2918
2918
  static field(container, field) {
2919
- const hasText = "name" in field && "value" in field && field.name && field.value;
2919
+ const hasText = ("name" in field || "value" in field) && (field.name || field.value);
2920
2920
  if ("button" in field && Array.isArray(field.button) && field.button.length > 0) {
2921
2921
  const actionRow = new import_discord16.ActionRowBuilder().addComponents(field.button);
2922
2922
  if (hasText) this.fieldAddText(container, { name: field.name, value: field.value });
package/dist/index.mjs CHANGED
@@ -1026,7 +1026,7 @@ var BotInteraction = class {
1026
1026
  // package.json
1027
1027
  var package_default = {
1028
1028
  name: "@spatulox/simplediscordbot",
1029
- version: "2.2.0",
1029
+ version: "2.2.1",
1030
1030
  author: "Spatulox",
1031
1031
  description: "Simple discord bot framework to set up a bot under 30 secondes",
1032
1032
  exports: {
@@ -2909,7 +2909,7 @@ var ComponentManager = class {
2909
2909
  options.value && container.addTextDisplayComponents(new TextDisplayBuilder().setContent(options.value));
2910
2910
  }
2911
2911
  static field(container, field) {
2912
- const hasText = "name" in field && "value" in field && field.name && field.value;
2912
+ const hasText = ("name" in field || "value" in field) && (field.name || field.value);
2913
2913
  if ("button" in field && Array.isArray(field.button) && field.button.length > 0) {
2914
2914
  const actionRow = new ActionRowBuilder4().addComponents(field.button);
2915
2915
  if (hasText) this.fieldAddText(container, { name: field.name, value: field.value });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spatulox/simplediscordbot",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "author": "Spatulox",
5
5
  "description": "Simple discord bot framework to set up a bot under 30 secondes",
6
6
  "exports": {