@moody-djs/prompts 1.0.3 → 1.0.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/dist/v2/index.js CHANGED
@@ -29,7 +29,6 @@ __export(v2_exports, {
29
29
  module.exports = __toCommonJS(v2_exports);
30
30
 
31
31
  // src/v2/Prompt.ts
32
- var import_node_util = require("util");
33
32
  var import_discord2 = require("discord.js");
34
33
 
35
34
  // src/v2/prompt.types.ts
@@ -177,7 +176,6 @@ var Prompt = class {
177
176
  const messageData = await this.unwrap(state.message, this.context);
178
177
  const components = await this.unwrap(messageData.components, this.context);
179
178
  this.registerComponents(components);
180
- console.log((0, import_node_util.inspect)(components, { depth: null }));
181
179
  const messageOptions = {
182
180
  components,
183
181
  fetchReply: true,
@@ -228,7 +226,9 @@ var Prompt = class {
228
226
  callback: builder.accessory.getCallback(),
229
227
  modal: builder.accessory.getModal()
230
228
  });
231
- } else if ("components" in builder && Array.isArray(builder.components)) {
229
+ } else if (builder instanceof import_discord2.ActionRowBuilder) {
230
+ this.registerComponents(builder.components);
231
+ } else if (builder instanceof import_discord2.ContainerBuilder) {
232
232
  this.registerComponents(builder.components);
233
233
  }
234
234
  }
package/dist/v2/index.mjs CHANGED
@@ -2,9 +2,10 @@ var __defProp = Object.defineProperty;
2
2
  var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
3
 
4
4
  // src/v2/Prompt.ts
5
- import { inspect } from "util";
6
5
  import {
6
+ ActionRowBuilder,
7
7
  Collection,
8
+ ContainerBuilder,
8
9
  MessageFlags,
9
10
  SectionBuilder,
10
11
  SnowflakeUtil
@@ -158,7 +159,6 @@ var Prompt = class {
158
159
  const messageData = await this.unwrap(state.message, this.context);
159
160
  const components = await this.unwrap(messageData.components, this.context);
160
161
  this.registerComponents(components);
161
- console.log(inspect(components, { depth: null }));
162
162
  const messageOptions = {
163
163
  components,
164
164
  fetchReply: true,
@@ -209,7 +209,9 @@ var Prompt = class {
209
209
  callback: builder.accessory.getCallback(),
210
210
  modal: builder.accessory.getModal()
211
211
  });
212
- } else if ("components" in builder && Array.isArray(builder.components)) {
212
+ } else if (builder instanceof ActionRowBuilder) {
213
+ this.registerComponents(builder.components);
214
+ } else if (builder instanceof ContainerBuilder) {
213
215
  this.registerComponents(builder.components);
214
216
  }
215
217
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moody-djs/prompts",
3
3
  "description": "A simple library for creating state based prompts in discord.js",
4
- "version": "1.0.3",
4
+ "version": "1.0.5",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
7
7
  "test": "tsc --noEmit --skipLibCheck",